Skip to content

Advanced Configuration

Giovanni Pellerano edited this page Oct 9, 2019 · 2 revisions

Performance tuning

The following is a set of tuning tips that could be done on Tor software, by modifying the torrc.

Please consider them as HIGHLY experimental.

Additionally the list of EntryNodes to be used, must be updated by using some kind of dynamic logic to only select stable and high-performance Tor Relays.

Those set of modifications should be done to /etc/tor/torrc file:

# disable adaptive circuit building timeout (we want to set it statically)
LearnCircuitBuildTimeout 0
# Try to build a circuit for 40 seconds (so it will try 4 time)
CircuitBuildTimeout 40
# Try a new circuit if it does not answer after 10 seconds
CircuitStreamTimeout 10
# Only use very long stable entry nodes such as the one managed by
# TorServers and NoiseTor
StrictNodes 1
EntryNodes noiseexit01a,noiseexit01b,noiseexit01c,noiseexit01d,manning1,manning2,wannabe,bolobolo1,wau,sofia,gorz,chomsky,rainbowwarrior,lumumba,assk,assk2,raskin
# Close HS connections that does not works properly
CloseHSClientCircuitsImmediatelyOnTimeout 1
CloseHSServiceRendCircuitsImmediatelyOnTimeout 1
# Use also circuits that are 2 hours old because we need stable and long term lived ones
MaxCircuitDirtiness 7200
# Enable more than just 32 circuits pending, because we have a lot of requests coming
MaxClientCircuitsPending 1024
# Reduce the timeout for socks client connection to 41 seconds (default 2 minutes), just 1seconds more than CircuitBuildTimeout
SocksTimeout 41
# Tor2web mode enabled
Tor2webMode 1
# Fetch directory authority immediately, to reduce the impact of Tor process reload
FetchDirInfoEarly 1
FetchDirInfoExtraEarly 1
# Disable Safe Logging (for debugging purpose, during the analysis of performance improvements)
SafeLogging 0