-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
intervals don't work as expected #125
Comments
From AaronMatthewBrown on December 18, 2013 07:26:07 A different possible fix. This sets the non-blocking mode on the sockets, and disables the sigalarm mode. The numbers come out on the nose with this, though I'm not sure if it breaks anything else. Attachment: socket_nonblocking.patch |
From ssahani@redhat.com on December 18, 2013 08:05:37 setnonblocking already in net.c |
From jef.poskanzer on December 18, 2013 08:08:45 Yeah - not currently called anywhere. Going non-blocking and getting rid of sigalrm mode is a not-obviously-bad idea. In addition to looking for things it breaks, we'd have to look carefully at the performance. |
From ssahani@redhat.com on December 18, 2013 08:11:03 Talking about the interrupted system call , the signals are handled by signal sys call . Looking at sigaction(2) man page can we think that setting the SA_RESTART flag is simpler that handling system call interruption. The documentation says that setting it will make certain system calls automatically restartable across signals. It would be a simpler implementation . |
From AaronMatthewBrown on December 18, 2013 08:13:57 The problem is SA_RESTART flag apparently gets auto-set if you use 'signal' because in doing an strace, it's auto-restarting anyway. The restarting is actually the problem, because when a network is lossy, the write can hang for an indeterminate period of time which is problematic when you're trying to make sure you're printing out results at specific intervals. |
From ssahani@redhat.com on December 18, 2013 08:45:23 the Nwrite function actually calculating how much is written and restarting the write again if it's interrupted if I am not wrong.
Currently sockets are not non-blocked yes write wound hang. |
From AaronMatthewBrown on December 18, 2013 08:52:02 The EINTR doesn't actually come out though because 'write' gets auto-restarted. Even if you do enable interrupting, there are 2 situations where it will still fail:
|
From ssahani@redhat.com on December 18, 2013 09:09:20 looking at the manual man 7 signal " If a blocked call to one of the following interfaces is interrupted by a signal handler, then the call will be automatically restarted after the signal handler returns if There is noway to specify SA_RESTART in signal system call.
|
From bltierney@es.net on December 18, 2013 13:59:17 Labels: Milestone-3.1a1 |
From AaronMatthewBrown on February 21, 2014 12:26:30 Here's an updated patch that also rips out the sigalrm code. In testing locally, things seem to work as expected (e.g. even on very lossy connections, the intervals happen as expected instead of quasi-randomly). Would it be possible to get this tested on the 40G testbed? I'm curious what impact the change from sigalrm to select might have. Attachment: iperf3_nonblocking_mode.patch |
Just to clarify: That commit was to a branch, not the mainline. I'll merge it after some testing and/or tweaking. |
So far so good testing on ESnet 100G testbed. No significant performance differences noted in some admittedly brief testing. Interval timers do behave much more sanely with (pathological) 10% packet loss configured using
After revision 081ba8e:
|
I merged the features/issue-125 branch to the master (mainline) codeline in revision 54f2264. I probably could have done a better job in the commit message, but I don't think I can go back and edit it. Closing this bug as fixed. |
This code change seems to have broken UDP tests, which now emit many lines of the form:
I'm testing a fix. Basically we want to only set non-blocking mode on sockets on the sending side, but not on the receiver side. (Usually this means only the client should set non-blocking mode, unless |
transfer. Note that the sender can either be the client or the server depending on whether --reverse is used. This fixes some problems with UDP transfers getting severely confused and (wrongly) complaining about packets arriving out of order. Related to issue #125.
Leaving this issue open for now while doing more testing on the (possible) fix I just committed. |
side sockets). This is reported to fix some oddities after a recent change in this area. Somewhat related to Issue #125. Submitted by: @i2aaron
@bltierney and I would like to see if we can get this into an upcoming 3.0.x maintenance release. |
Testing tip of master on the ESnet 100G testbed (same conditions as 17 April tests)...TCP intervals work well:
UDP tests exhibit no regressions (seen from the receiver):
Tested with SCTP as well (results not shown). This looks good enough to merge. |
transfer. Note that the sender can either be the client or the server depending on whether --reverse is used. This fixes some problems with UDP transfers getting severely confused and (wrongly) complaining about packets arriving out of order. Related to issue #125. (cherry picked from commit cbacc1d) Signed-off-by: Bruce A. Mah <bmah@es.net>
Merge to the 3.0-STABLE branch complete and lightly tested. Closing this issue. |
…able. We need this to permit a UDP receiving iperf3 server to listen on its control channel. The fix for non-blocking sockets basically makes sure that if we do a read on a non-blocking sockets, but there's no data, the UDP processing code does *not* try to do the normal protocol packet processing on the non-existent packet. This is part of an ongoing fix for issue #212 but also should have been a part of the fix for issue #125.
…able. We need this to permit a UDP receiving iperf3 server to listen on its control channel. The fix for non-blocking sockets basically makes sure that if we do a read on a non-blocking sockets, but there's no data, the UDP processing code does *not* try to do the normal protocol packet processing on the non-existent packet. This is part of an ongoing fix for issue #212 but also should have been a part of the fix for issue #125. (cherry picked from commit 8694d1d) Signed-off-by: Bruce A. Mah <bmah@es.net>
In some work related to #125, we introduced a bug in which chunks of a file being read for the -F option were not completely sent, particularly with TCP sockets. We attempt to fix this by detecting cases in which not all data passed to a socket could be actually sent (for example due to full socket buffers) and preserving that data for future send iterations. The ending statistics in the "diskfile" JSON structure were wrong, and did not properly distinguish between sender-side and receiver-side statistics. This has been fixed (at least for the client side). Specifically mention in the manpage that "iperf -F" is not a file transfer tool.
Attempt to fix some brokenness in -F from #301. In some work related to #125, we introduced a bug in which chunks of a file being read for the -F option were not completely sent, particularly with TCP sockets. We attempt to fix this by detecting cases in which not all data passed to a socket could be actually sent (for example due to full socket buffers) and preserving that data for future send iterations. The ending statistics in the "diskfile" JSON structure were wrong, and did not properly distinguish between sender-side and receiver-side statistics. This has been fixed (at least for the client side). Specifically mention in the manpage that "iperf -F" is not a file transfer tool.
From AaronMatthewBrown on December 18, 2013 05:39:49
In testing intervals on lossy networks, we get some ... interesting results:
[ 4] 0.00-2.13 sec 256 KBytes 984 Kbits/sec
[ 4] 2.13-5.13 sec 256 KBytes 700 Kbits/sec
[ 4] 5.13-7.63 sec 128 KBytes 418 Kbits/sec
[ 4] 7.63-9.53 sec 128 KBytes 552 Kbits/sec
[ 4] 9.53-11.03 sec 128 KBytes 699 Kbits/sec
[ 4] 11.03-13.23 sec 128 KBytes 477 Kbits/sec
[ 4] 13.23-19.23 sec 128 KBytes 175 Kbits/sec
[ 4] 19.23-19.23 sec 0.00 Bytes 0.00 bits/sec
[ 4] 19.23-19.23 sec 0.00 Bytes 0.00 bits/sec
[ 4] 19.23-21.23 sec 128 KBytes 524 Kbits/sec
Email from Aaron:
Email from Jef:
Email from Aaron:
Email from Jef:
Email from Aaron:
Attachment: interval_timing_changes.patch
Original issue: http://code.google.com/p/iperf/issues/detail?id=125
The text was updated successfully, but these errors were encountered: