Professional Documents
Culture Documents
org/projects/tor/wiki/doc/FireFoxTorPerf
Procedure 1
First, open Firefox's advanced settings menu by running about:config from the address bar.
Upon entering this address, you will see a long list of internal settings. Modify the following ones
and set them to the suggested values shown here for maximum performance:
Afterwards, just restart the browser and experience the difference! For some automated
additional performance hacks, check out the FasterFox extension. You also can do the same
tweaks manually with the help of this page.
NOTE1: Proxy pipelining may not be well supported by Privoxy. For this reason, you may want
to install Polipo and use that instead of Privoxy to get the performance benefits of pipelining. If
you use Torbutton (which you should, if you want any anonymity at all), all of the Tor-relevant
privacy scrubbing features of Privoxy are no longer necessary.
NOTE2: Do not use page prefetching. Disable this if it is enabled. Prefetching is a speculative
feature, which assumes that you will read the pages referenced by the links in the current page
you are viewing. This places undue load on the Tor network and clog your circuits with
unnecessary traffic. Its unlikely you will read all the pages referenced by the current page,
especially in the case of search engines results.
Polipo as a proxy instead of Privoxy has been discussed in some places online, with reports that
it is more performant. To use this proxy:
-c "C:\Program Files\Polipo\config"
You will not see a shell window for Polipo, but the process will be created and visible in the Task
Manager. Check the process exists to assure it is working correctly.
1 of 4 6/19/12 12:45 AM
doc/FireFoxTorPerf – Tor Bug Tracker & Wiki https://trac.torproject.org/projects/tor/wiki/doc/FireFoxTorPerf
You will need: The on-line reference to Tor properties, that can be placed in torrc. Always back
up this file before editing.
Lets think of a Non-Functional Requirement we might like to place on our Tor client.
we want it to establish circuits as quickly as possible. If it takes too long to do this ignore
them, by timing out the building of circuits quickly.
now we have circuit build time-outs occurring more frequently, we need to encourage Tor
to try to generate circuits more often.
Once we have established a circuit, we are assuming its a good one and we don't want it
being timed out by firewalls or anything else. We need to make sure a ping occurs on the
circuit to prevent this.
In order to accomplish this, use the latest tor 0.2.2.x-alpha as circuit based timings are
automatic and enabled by default.
############################
allowUnalignedRangeRequests = true
disableLocalInterface = true
maxPipelineTrain = 32
proxyName = "Polipo"
proxyPort = 8118
serverMaxSlots = 32
allowedClients = "127.0.0.1"
cacheIsShared = false
censoredHeaders = from,accept-language,x-pad,link
censorReferer = maybe
chunkHighMark = 50000000
disableVia=true
diskCacheRoot=""
localDocumentRoot=""
maxConnectionAge = 300s
maxConnectionRequests = 30000
socksParentProxy=localhost:9050
tunnelAllowedPorts = 1-65535
############################
The settings above enable Polipo to replace Privoxy, but still enables the Tor toggle button to
operate, if you are using the Tor FireFox plugin.
Privoxy config.txt
2 of 4 6/19/12 12:45 AM
doc/FireFoxTorPerf – Tor Bug Tracker & Wiki https://trac.torproject.org/projects/tor/wiki/doc/FireFoxTorPerf
-- --
Privoxy:buffer 265 (KB)
toggle 0
Windows enables the program running in the foreground to have heightened processor
resources. If this option is switched to 'Background Processes', Tor appears to return
consistently higher performance. This option can be found in 'My Computer | Right click |
Properties | Advanced Tab | Performance Settings | Advanced tab again.
Windows XP has a self-tuning IP stack, but it can still benefit from a little help. Using the TCP
Optimiser tool from above you can tune the MTU, RWIN, SACK OPTS (rfc 2038), and
tcp1323opts controlling window scaling. The tool has one button optimize. This setting is
sufficient to benefit from immediate increases to Tor throughput. To increase throughput further
you can try experimenting with lower values of the IP TTL (Time To Live). Values as low as 32
will work and result in improved performance. Also try experimenting with smaller
TCPWindowSizes. This setting is automatically adjusted when you move the slider marked
'Connection Speed' of the TCPOptimizer tool.
You can view your connection parameters and their effects on your connections, both with Tor
and without Tor, at [ http://www.dslreports.com/tweaks|DSLReports]
Event ID 4226 Patcher - Remove the limit on TCP connection attempts XP SP2 (win32)
[ the limit on TCP connection attempts] SpeedGuide.net has an interesting article detailing this
restriction introduced in XP SP2. Microsoft have restricted the amount of half-open TCP/IP
connections with the proviso that it would reduce the pace that worms spread. As noted by
SpeedGuide, internet worms spread isotropically (multi-directionally) and so their infection rate
is exponential. As such, placing a constant (limit) on the rate of connection creation for every
computer running XP SP2 will slow the rate of worms spreading (for that group of computers)
but not by much. Consider the population of humans on the planet. Its over ~6 billion.
Supposing all these people are running Windows XP SP2, with rate limited half-open
connections. Rate limiting is set to 10 half-open connections per second. To infect the entire
population of computers would take: We are assuming optimum forward infection here. In the
first second we have infected 10 machines. The 2nd second to elapse will cause (10 x 10) + 10
= 110 computers to be infected. The 3rd second to elapse would cause:
3 of 4 6/19/12 12:45 AM
doc/FireFoxTorPerf – Tor Bug Tracker & Wiki https://trac.torproject.org/projects/tor/wiki/doc/FireFoxTorPerf
In 12 seconds, we would have 10 12 = 1 billion computers infected. Full infection occurs before
13 seconds have elapsed !
This is all skewed by network topologies and routing algorithms, but they would affect a
non-limited network in an identical manner. So the affect is a theoretical maximum of 13
seconds of additional notice to act against the worm. To all intents and purposes, this is useless.
Of much more interest is the effect on ANY network that relies on many open connections, such
as Tor and a host of P2P applications. The effect here is a slow down of communications, with
the limit acting as the catalyst.
Reducing DNS caching time reduces the risk of an invalid DNS resolve, given Tor servers may
be operating in a DHCP environment that updates the IP each time the network connects.
4 of 4 6/19/12 12:45 AM