Thread (49 messages) 49 messages, 7 authors, 2007-06-04

Re: iperf: performance regression (was b44 driver problem?)

From: Maximilian Engelhardt <hidden>
Date: 2007-06-04 20:53:42
Also in: linux-wireless, lkml

On Monday 04 June 2007, Stephen Hemminger wrote:
On Mon, 4 Jun 2007 21:47:59 +0200

Maximilian Engelhardt [off-list ref] wrote:
quoted
On Monday 04 June 2007, Ingo Molnar wrote:
quoted
* Stephen Hemminger [off-list ref] wrote:
quoted
Yes, the following patch makes iperf work better than ever. But are
other broken applications going to have same problem. Sounds like the
old "who runs first" fork() problems.
this is the first such app and really, and even for this app: i've been
frequently running iperf on -rt kernels for _years_ and never noticed
how buggy its 'locking' code was, and that it would under some
circumstances use up the whole CPU on high-res timers.
I must admit I don't know much about that topic, but there is one thing I
don't understand. Why is iperf (even if it's buggy) able to use up the
whole cpu? I didn't run it as root but as my normal user so it should
have limited rights. Shouldn't the linux scheduler distribute cpu time
among all running processes?
In this case, there are two threads. One is receiving data and the other
is spinning checking on progress. If the spinning thread doesn't yield,
it will end up using it's whole quantum (10ms at 100hz), before the
scheduler lets the receiver run again. If the receiving thread doesn't
get to run then on a UP the performance stinks.
Ok, let's see if I got this right:
If there are other processes that want cpu time they will get it after the 
quantum for the iperf thread is used up. So cpu time will be distributed 
among other processes, but it takes some time until they get it and this 
increases latency.
The problem only showed up laptop because most of my other systems are
SMP (or fake SMP/HT), and usually set HZ to 1000 not 100.
Hm, on my laptop (Pentium M) I have configured CONFIG_HZ_300 and CONFIG_NO_HZ.
On my desktop PC (Athlon 2000+, also UP) I also have CONFIG_HZ_300 and 
CONFIG_NO_HZ but didn't notice the problem.

Maxi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help