Hi, I applied the patch to the 2.0.4 version but I still have the CPU usage of 99.9%. (I tried the patch on a fedora distribution and on a Knoppix)
Do you have any idea guys why it failed for me. Please tell me if you need further information. Thanks. The patch we were talking about is not OS-specific - it is https://sourceforge.net/tracker/index.php?func=detail&aid=1940009&group_id=128336&atid=711373 Quoting anand: | Hi Renker, | | Is there a patch or a way to reduce the CPU utilization with Iperf | 1.7.0 for UDP tests in Windows XP ? | | Thanks, | Anand | | -----Original Message----- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] On Behalf Of Gerrit | Renker | Sent: Monday, May 12, 2008 11:32 AM | To: Laurence Kirchmeier | Cc: [EMAIL PROTECTED] | Subject: Re: [Iperf-users] Iperf Transmit leading to 100% CPU Utilization | | These measurements agree with local ones seen on Pentium IV and are in the | area where the nanosleep() patch applies: only UDP (and in other patches, | DCCP too) uses the delay_loop() to pace the speed of outgoing packets, in | TCP there is no waiting loop. | | With regard to reducing overall CPU usage it might make sense to look into | the patches developed by Ingo Molnar. I found that 2.0.4 had quite an | improved CPU usage (in 2.0.2 without the patches by Ingo Molnar it | was often between 97%-100%). | | Gerrit | | Quoting Laurence Kirchmeier: | | Compiling the base 2.0.4 code on a MacMini running 10.5, I noticed that | | CPU usage remained quite low for TCP based tests between two MacMinis. | As | | soon as I switched to running a UDP test between the 2 MacMinis, the | CPU | | usage was all consumed by the iperf application (90% plus). I then | | applied the patch to the 2.0.4 base code, recompiled and repeated the | UDP | | tests between the 2 MacMinis and CPU usage was now similar to the TCP | | tests - below 10%. | | Laurie | | _______________________________________________ | | _______________________________________________ | | Laurence Kirchmeier | | MVCS Project Manager & Senior Engineer, Networking R&D | | Merit Network Inc. Tel. 734 936 9703 | | Email: [EMAIL PROTECTED] Fax. 734 647 3185 | | _______________________________________________ | | _______________________________________________ | | On May 4, 2008, at 4:36 AM, Oren Meron wrote: | | | | Hi Gerrit, | | Running 2.0.4 version produced in TCP runs much better BW in medium | size | | messages. (340 MB/sec vs 40 MB/sec at 128 bytes msg and 4 processes) | | But the cpu usage rises as well at these area (from 10% to 45%). | | Applying both the above patches do not improve cpu usage. | | | | Should I expect a cpu usage reduction, or is it the price for the | | improved BW ? | | | | Thanks, | | | | Oren Meron | | Performance | | | | -----Original Message----- | | From: [EMAIL PROTECTED] | | [mailto:[EMAIL PROTECTED] On Behalf Of | Gerrit | | Renker | | Sent: Friday, May 02, 2008 4:05 PM | | To: Upakul Barkakaty | | Cc: [EMAIL PROTECTED] | | Subject: Re: [Iperf-users] Iperf Transmit leading to 100% CPU | | Utilization | | | | Thank you for testing. After this email I also checked again: | | | | * with the old busy-wait loop, there are three threads, and one is | | always close to 100% (I think that is the one you mean); | | | | * using either of select() or nanosleep() to replace the | delay_loop() | | reduces the number of threads to 2 (the usage is still quite high, | | between 80% and 90%). | | | | I will tidy the patch up, in earlier tests using nanosleep() had in | | addition the best resolution. | | | | Gerrit | | | | Quoting Upakul Barkakaty: | | | Hi Gerrit, | | | | | | Thanks a lot. This patch has really helped. | | | | | | -- | | | Regards, | | | Upakul Barkakaty | | | | | | On 5/2/08, Gerrit Renker <[EMAIL PROTECTED]> wrote: | | | | | | Upakul, | | | | | | thank you for testing. So it seems the problem is not in this | | corner. I | | | also recall comparing the performance of iperf 2.0.4 against | | 2.0.2 with | | | that patch - Jon has added some condition variables, which | seem | | to have | | | a similar effect (testing with 2.0.4 also gave modest CPU | usage). | | | | | | With regard to the delay loop, the high CPU consumption seems | | clear | | | since delay_loop() constantly calls gettimeofday(), i.e. | issueing | | the | | | same system call over and over again in a busy-wait loop. | Which | | agrees | | | with your analysis. | | | | | | I have had problems with this, too, but in a different corner: | | when | | | measuring the actual times, delay_loop() sometimes added | | something like | | | 50 milliseconds at random times, which seems like a quantum | for a | | | context switch. | | | | | | It got much better when replacing the busy-wait loop with a | call | | to the | | | Posix function nanosleep(), since this uses hrtimers | internally | | and | | | blocks signals. | | | | | | Although the patch was initially not intended to reduce CPU | | usage, I | | | could well imagine that it does since removes the busy-wait | loop. | | | | | | If you have a moment of time, could you check out whether this | | makes a | | | difference -- it is in the repository, on | | | | | | | | | | https://sourceforge.net/tracker/index.php?func=detail&aid=1940009&grou | | | p_id=128336&atid=711373 | | | | | | Best regards | | | | | | Gerrit | | | | | | Quoting Upakul Barkakaty: | | | | Hi Gerrit, | | | | | | | | Thanks a lot for your reply. I indeed tried out the patch | | but it | | | did not | | | | make any difference. I am still seeing 0% CPU Idle. | | | | | | | | It looks to me as if the delay_loop() function in the | file | | | Client.cpp is | | | | holding the processor in the kernel space while adjusting | | the | | | thoughput | | | | speeds, resulting in 0% CPU Idle. On trying out replacing | | | delay_loop() by | | | | usleep() function, Idle MIPS were seen to be available. | Or | | perhaps | | | is it | | | | the case that iperf should be used only for throughput | | measurement | | | and | | | | might not be so appropriate for measuring the cpu | | utilization? | | | | | | | | -- | | | | Regards, | | | | Upakul Barkakaty | | | | | | | | On 5/2/08, Gerrit Renker <[EMAIL PROTECTED]> wrote: | | | | | | | | Dear Upakul, | | | | | | | | if it is not too much of a bother, can you please check | if | | the | | | attached | | | | patch fixes the CPU usage problem? | | | | | | | | It is a port of Ingo Molnar's CPU usage fix - we have | used | | that | | | patch in | | | | iperf with great benefit (the CPU usage went down to | very | | modest | | | | values). | | | | | | | | Regards | | | | Gerrit | | | | | | | | Quoting Upakul Barkakaty: | | | | | Hi Jon, | | | | | | | | | | I have upgraded to Iperf-v2.0.4. But | unfortunately, | | even | | | with this | | | | version | | | | | I observed that the Iperf client was consuming all | | the CPU | | | MIPS | | | | even if it | | | | | was running at 1 Mbps. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Iperf-users mailing list Iperf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iperf-users