[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #7291 [Tor]: Investigate making MaxOnionsPending time-based
#7291: Investigate making MaxOnionsPending time-based
-------------------------+--------------------------------------------------
Reporter: mikeperry | Owner:
Type: enhancement | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.4.x-final
Component: Tor | Version:
Keywords: tor-relay | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Changes (by nickm):
* status: new => needs_review
Comment:
I've done a branch "onionqueue_timer" to keep track of how long onions
have been in the queue for before they get handed off to a cpuworker. If
as I suspect the answer is something like (150 msec / NumCPUs), then we
should consider a new approach.
A more reasonable approach is something like: Let T_max be the longest
amount of time we're willing to queue an onionskin for. Let T_o be the
time it takes to process an onionskin. Don't queue more than NumCPUs *
(T_max / T_o) onionskins. Assuming a modest server like my laptop,
setting T_max == 1 sec, NumCPUs == 4, and T_o == 2.2 msec, that gives
something more like 1800 as a good limit for a modest server.
Having both ntor and TAP onionskins will complicate this a little, but not
by too much.
If we start to recommend high values for MaxOnionsPending, we should look
closely at the code for onion_pending_remove: It does a linear search over
the queue, which is probably not so good if we're looking forward to a
time of super-fast servers with leneant timeouts and a large volume of
ntor traffic. (T_max = 2 s, NumCPUS == 16, T_o == 150 usec => Wow, would
we even ever want to allow that?)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7291#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs