Version 154 (modified by trac, 9 years ago) (diff)


Hacking Firefox for Maximum Performance with Tor


Tor is known for being secure but slow. If you want to improve browsing speed a bit, please follow the following simple instructions for tweaking the Firefox web browser's settings:

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:

network.http.keep-alive.timeout:600 (300ms default is OK usually, but 600 is better.)
network.http.max-persistent-connections-per-proxy:16 (Default is 4)
network.http.pipelining:true (Default- false. Some old HTTP/1.0 servers can't handle it.)
network.http.pipelining.maxrequests:8 (No default)
network.http.proxy.keep-alive:true (Default- true, but double check)
network.http.proxy.pipelining:true (Default- false) - see Proecedure 2 below.}}}
Afterwards, just restart the browser and experience the difference! For some automated additional performance hacks, check out [ FireTune]. Currently, Fire{{{}}}Tune is only for Win32, but you can do the same tweaks manually with the help of [ this page].

== Procedure 2 - an update and addendum to Procedure 1 ==
These results were arrived at empirically, using the win32 bundle, Tor & Privoxy & Vidalia bundle:

 * [ Tor Button]
 * [http:// Configuration Mania for Firefox]
 * [ TCPOptimizer (win32)]
 * [ Event ID 4226 Patcher (win32)]
 * DNS Latency

=== Tor Button - enable / disable Tor access in FireFox ===
This provides an optional button or text in the bottom right of the browser window in Firefox. This allows you to switch Tor on and off.

=== Configuration Mania - Modify performance related settings in FireFox ===
This plugin modifies the networking and cache settings for Firefox. When you load Configuration Mania, select the HTTP Network settings tab.

    * Tor may perform better with HTTP1.0 over HTTP1.1. Its worth experimenting with this setting. It is claimed that some proxies and firewalls do not work well with HTTP1.1, but it may be ascertained empiracally, through experimentation, which is best.
    * Tor may or may not work well with HTTP1.1 pipelining. Ensure pipelining is disabled (default) for proxy connections. There is some confusion over this setting, which a cursory search will reveal. [ Search on Firefox Pipelining]
    * Tor may or may not not work well with Persistent HTTP connections. Ensure this option is disabled for proxy connections. Again some confusion abounds as a cursory search reveals [ Search on HTTP Keep-Alive]. In any case, there may be issues with decreased anonymity with persistent connections.

NOTE: 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. Its unlikely you will read all the pages referenced by the current page, especially in the case of search engines results.

=== TCPOptimizer -  2K/XP's throughput (win32) ===
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 RWIN, SACK OPTS (rfc 2038), and tcp1323opts controlling window scaling. The tool has one button optimise. 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.

Use '''''ping -f -l NNN''''', on Windows, to find your maximum MTU (Maximum Transmissionn Unit), where NNN represents the largest integer value for the size of your MTU BEFORE fragmentation occurs.
This could vary between PPPoE (3G Cards) and PPPoA (ADSL Broadband). Use the smallest of any RWIN value you find, to cover all your potential types of connection to the net. The value should be around 1472, so start testing at around this value, moving the value higher until the packet fails delivery due to the requirement to fragment it.

You can view your connection parameters and their effects on your connections, both with Tor and without Tor, at [http://www.dslreport