[tor-scaling] Inprocess Cell Time Tracing

Rob Jansen rob.g.jansen at nrl.navy.mil
Mon Aug 19 15:04:11 UTC 2019



> On Aug 8, 2019, at 8:10 AM, David Goulet <dgoulet at torproject.org> wrote:
> 
>> 
>> If not, and in case it's useful, I developed a multi-threaded library to
>> measure kernel in/out buffer times [0]. It uses libpcap to measure kernel
>> queuing times of packets.
> 
> Does this has good performance? Thing with libpcap is that they do not provide
> any guarantee that all the packets will be seen by libpcap. Under pressure,
> you can miss some.
> 
> But also, on a 25MB/s relay that is capping the CPU, I worry about adding an
> intrusive library that could slow things down which changes drastically the
> behavior of the application leading to very different results.
> 
> That is the primary reason why I'm not doing this whole thing with log_*() in
> tor for instance due to the performance hit and behavior change.

Regarding performance, the tracing code mostly runs in helper threads not in the main thread, though there is some unavoidable overhead on the main thread in sending the pointer to new data over to the helper thread.

I didn't notice any slowdowns with running on a fast exit, but I wasn't trying to fully load it in order to test the limits of my code either.

Regarding missing some packets; that was OK in my case because I was only sampling cells anyway. Missing some packets would just cause a timeout, which then would cause the code to evict the "stuck" event and move to the next.

Anyway, sounds like you have your own methods and learning something new wouldn't be worthwhile. Good luck!

PLP,
Rob


More information about the tor-scaling mailing list