]> git.ipfire.org Git - thirdparty/tor.git/commit
Eliminate MaxOnionsPending; replace it with MaxOnionQueueDelay
authorNick Mathewson <nickm@torproject.org>
Wed, 26 Dec 2012 23:08:01 +0000 (18:08 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 3 Jan 2013 18:03:41 +0000 (13:03 -0500)
commitb0b3c14c11afe55cd71f9c1b8a89d9e5a65c9799
tree5c360b7f1aa0e77061676949bb1679fa4311190d
parentdffc8e359bcfeb00813a3afde6aa2328f6a6a476
Eliminate MaxOnionsPending; replace it with MaxOnionQueueDelay

The right way to set "MaxOnionsPending" was to adjust it until the
processing delay was appropriate.  So instead, let's measure how long
it takes to process onionskins (sampling them once we have a big
number), and then limit the queue based on its expected time to
finish.

This change is extra-necessary for ntor, since there is no longer a
reasonable way to set MaxOnionsPending without knowing what mix of
onionskins you'll get.

This patch also reserves 1/3 of the onionskin spots for ntor
handshakes, on the theory that TAP handshakes shouldn't be allowed to
starve their speedier cousins.  We can change this later if need be.

Resolves 7291.
changes/timed_onionqueue [new file with mode: 0644]
doc/tor.1.txt
src/or/config.c
src/or/cpuworker.c
src/or/cpuworker.h
src/or/onion.c
src/or/or.h