New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too many gettimeofday calls #210
Comments
Every time iperf3 goes to send a packet it does a timestamp to figure out the rate control thing. If it's OK to send a packet, it goes into the UDP packet sending code which...takes another timestamp to put into the packet for the jitter measurement. A few microseconds later. Sigh. :-) |
I wonder if it'd make sense to push the "bandwidth" logic into the 'select' loop side of things instead of deep down in the iperf_send case. If the select timeouts are set so that it breaks out, and the "send" side of things happens at a given rate, I think it should Just Work. That could save some of the "gettimeofday", especially if the 'timer' stuff ends up tracking "number of times select has exited" to figure out the time, instead of calling gettimeofday at each exit. I dunno if it's worth it, but moving the bandwidth logic may make it easier to track what's actually happening. |
I tried a quick hack on this and wasn't able to reproduce the strace results. I need to play with this more. |
Using gettimeofday to measure time intervals is a bug, since it's not monotonic. Nice explanation here. |
Closing. The original issue is still valid, but it's not likely that we're going to do much if anything about it at this point. It can be re-opened if necessary. |
From a comment by gallatin@gmail.com to the iperf-users@ list:
The text was updated successfully, but these errors were encountered: