Hey Andrew, I’ve got a few patches I hacked together that use posix timers for the timers instead of the heavy gettimeofday usage done before. They seem to work, with the caveats that it stills calls gettimeofday per-packet, the intervals can be slightly off (e.g. 0.00-1.06 instead of 0.00-1.00), and i’ve not tested burst mode at all to verify if it works or not. You can grab a copy of the source from http://ndb1.internet2.edu/~aaron/iperf-3.0.7-signal.tar.gz . The patches themselves are:
http://ndb1.internet2.edu/~aaron/0001-Modify-the-timer-stuff-to-use-POSIX-timers-instead-o.patch http://ndb1.internet2.edu/~aaron/0002-Handle-the-rate-based-tests-using-timers-instead-of-.patch http://ndb1.internet2.edu/~aaron/0003-Remove-some-spurious-commits.patch I’d be curious what your experience with these ends up being since gettimeofday runs quickly on my hosts :) Cheers, Aaron On Sep 10, 2014, at 12:14 PM, Andrew Gallatin <galla...@gmail.com> wrote: > I was looking at the iperf3 source code, and its ... unfortunate ... that > iperf3 still seems to be nearly as much of a gettimeofday() benchmark as it > is a network benchmark. > > For example, if I want to send UDP as fast as possible, I'll do something > like: > iperf -c 172.18.126.63 -u -b 9999999M > > If I use strace -c on this, I see: > > % time seconds usecs/call calls errors syscall > ------ ----------- ----------- --------- --------- ---------------- > 42.92 0.238950 1 287535 gettimeofday > 41.96 0.233611 3 71567 write > 14.87 0.082772 1 72900 select > > The pattern seems to be: > > gettimeofday > gettimeofday > select > gettimeofday > gettimeofday > write > gettimeofday > gettimeofday > select > <repeats> > > This isn't a problem on *most* OSes (and it is getting better), but it can > lead to surprisingly bad results on 10GbE or 40GbE networks on some OSes, > especially one that chose an expensive timecounter (eg, one that does a PIO > read access on every gettimeofday). This is the big reason why I still use > netperf. > > Maybe iperf needs a "go fast" option that dispenses with all timing except to > mark the time at the start & end of the test. > > Drew > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk_______________________________________________ > Iperf-users mailing list > Iperf-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iperf-users ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Iperf-users mailing list Iperf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iperf-users