[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Failed to hand off onionskin



     On Sat, 20 Dec 2008 03:09:58 +0100 Mitar <mmitar@xxxxxxxxx> wrote:
>On Sat, Dec 20, 2008 at 12:30 AM, Scott Bennett <bennett@xxxxxxxxxx> wrote:
>> Roger missed mentioning (step two) that you can adjust the queue limit
>> yourself, e.g., by adding to torrc
>>
>> MaxONionsPending 200
>>
>> to double the default limit of 100.  Try 200, and if that takes care of it,
>> fine.  If not, set it to something higher.  It does increase tor's memory
>> requirement, but only by a small amount.
>
>But is not this value more something of a "warn when there is so many
>onions queued"? OK, it is true that higher values somehow smooth out

     No.  The error message you got meant that the queue overflowed and
one or more onionskins was/were lost because it/they could not be queued.
Increasing the queue limit to a high enough value means that none will be
lost, even if it takes a bit longer for your CPUs to get caught up.  Note
that you do not have to shut down your relay in order to make this change.
Just edit torrc, resave it, and send tor a SIGHUP.

>peeks, but otherwise it also means that I would introduce larger
>delays for onions going through my relay. From a perspective of "real
>time" processing it means that I would increase the limit of "real
>time". So the question is what is better: that I decrease advertised
>bandwidth and have onions routed almost immediately or that I

     It isn't routing of onionskins.  It is decrypting of onionskins.
This is apparently done when a circuit is being extended (i.e., built).
Routing of cells is an independent concept and unfortunately does not
currently lend itself to parallel processing by tor. :-(  However,
onionskin decrypting involves a CPU-intensive public key system, whereas
encrypting and decrypting of cells uses a symmetric key system, which
involves comparatively lightweight processing.

>advertise more bandwidth (which I do have) but that from time to time
>it could happen that it takes a lot of time for some of them to get
>through.

     I recommend going with the high data rate.  That means the actual
peak data rates will be limited by your CPU speed, rather than the
data capacity of your Internet connection.
     [pet-peeve rant on]
     How about if people stop misusing the term "bandwidth" for data
transmission rates and capacities, which have nothing at all to do with
the {wavelength,wavenumber,frequency,period} bandwidths?  Slang popularity
is not justification for misuse of technical terminology.
     [pet-peeve rant off]
>
>On the other hand it could be true that the default value is meant for
>relays with lower bandwidth and so there is a lot of onions going
>through the system and they are also processed very fast: only that
>there are so many of them at a given moment that the queue gets full.

     As noted above, the onionskin processing is relatively time-
consuming, which is why it is possible on a high-data-rate system with
a not-so-fast CPU to have a backlog at times.  Don't worry about the
backlog.  The main thing is to avoid connection failures due to lost
onionskins.

>It is not so much a problem of delay than of a supporting high
>throughput.
>
     The delay ought to be trivial.  After all, your machine essentially
can dedicate a core to onionskin processing with unused time on the other
core available to help out.  If you've only seen the message once or a
few times, it can't be a huge problem.  Just increase the queue limit,
and see what happens.  My prediction is that you will notice no change,
but that you will also not get the error message again.
     As for having one core running at 85% - 100% CPU-bound, a good rule
of thumb is that a processor on a production system that averages higher
than 70% CPU-bound is due for an upgrade.


                                  Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet:       bennett at cs.niu.edu                              *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************