-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix burst mode throttle checking #898
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
Conversation
When burst mode is configured for unlimited rate (-b0) but with a specific packet burst value (e.g. /1000), iperf only sends packets once, after that the iperf_check_throttle function gets called and sets green_light=0 due to the rate value being 0 and average calculated rate always being higher than 0. The iperf_check_throttle function is designed to be skipped in case the target rate is unlimited or if a specific burst value was configured, however this skip is only utilized in one place where the function is called leading to the situation above. This can be fixed by moving the "skip throttling" condition directly inside the iperf_check_throttle function. Signed-off-by: Ondrej Lichtner <[email protected]>
Thanks for the PR. I'm trying to remember what are the semantics exactly of doing burst mode on an unlimited-rate UDP transfer? In other words what's the difference between |
Yes, I also think that both are supposed to "spew packets out as fast as they can" which is the reason for my pull request. Which I assume means that the On master, the condition for "should I do throttling" is only in one place - before calling the throttle function and in the send burst loop. However, the throttling function is also called after this loop at which point it calculates that the target rate '0' (as configured through This means that the |
I'll just repeat that this is related to the issue #899 where I can workaround slow udp generation by using the |
Got it. I'm going to have to find some time to stare at this code for a little while (as well as your bug report in #899). Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I finally get it. There are multiple calls to iperf_check_throttle(). Your point was that only one of them had the "skip throttling" condition around it, and it makes more sense to put the "skip throttling" check inside iperf_check_throttle() itself.
I tested this and it seemed to work correctly.
I wonder if another way to do this would have been to force burst to 0 if the rate was 0 when starting a new test. Your way is a little more robust, however.
Will merge this shortly.
Version of iperf3 (or development branch, such as
master
or3.1-STABLE
) to which this pull request applies: masterIssues fixed (if any):
While investigating a different iperf issue with udp stream tests I noticed that using -b 0/1000 results in iperf sending 1000 packets and then just idle for the remainder of the test duration.
The full command I was using to reproduce the issue:
iperf3 -c 192.168.101.2 -B 192.168.101.1 -b0/1000 -u -t 10 -l 1400
When burst mode is configured for unlimited rate (-b0) but with a
specific packet burst value, iperf only sends packets once, after that
the iperf_check_throttle function gets called and sets green_light=0
due to the rate value being 0 and average calculated rate always being
higher than that.
This can be fixed by moving the "don't throttle" condition
directly inside the iperf_check_throttle function.
Signed-off-by: Ondrej Lichtner [email protected]