From: Bill Fink <billfink@mindspring.com>
To: hadi@cyberus.ca
Cc: James Chapman <jchapman@katalix.com>,
netdev@vger.kernel.org, davem@davemloft.net, jeff@garzik.org,
mandeep.baines@gmail.com, ossthema@de.ibm.com,
Stephen Hemminger <shemminger@osdl.org>
Subject: Re: RFC: possible NAPI improvements to reduce interrupt rates for low traffic rates
Date: Wed, 12 Sep 2007 03:04:28 -0400 [thread overview]
Message-ID: <20070912030428.16059af6.billfink@mindspring.com> (raw)
In-Reply-To: <1189171370.4234.38.camel@localhost>
On Fri, 07 Sep 2007, jamal wrote:
> On Fri, 2007-07-09 at 10:31 +0100, James Chapman wrote:
> > Not really. I used 3-year-old, single CPU x86 boxes with e100
> > interfaces.
> > The idle poll change keeps them in polled mode. Without idle
> > poll, I get twice as many interrupts as packets, one for txdone and one
> > for rx. NAPI is continuously scheduled in/out.
>
> Certainly faster than the machine in the paper (which was about 2 years
> old in 2005).
> I could never get ping -f to do that for me - so things must be getting
> worse with newer machines then.
>
> > No. Since I did a flood ping from the machine under test, the improved
> > latency meant that the ping response was handled more quickly, causing
> > the next packet to be sent sooner. So more packets were transmitted in
> > the allotted time (10 seconds).
>
> ok.
>
> > With current NAPI:
> > rtt min/avg/max/mdev = 0.902/1.843/101.727/4.659 ms, pipe 9, ipg/ewma
> > 1.611/1.421 ms
> >
> > With idle poll changes:
> > rtt min/avg/max/mdev = 0.898/1.117/28.371/0.689 ms, pipe 3, ipg/ewma
> > 1.175/1.236 ms
>
> Not bad in terms of latency. The deviation certainly looks better.
>
> > But the CPU has done more work.
>
> I am going to be the devil's advocate[1]:
So let me be the angel's advocate. :-)
> If the problem i am trying to solve is "reduce cpu use at lower rate",
> then this is not the right answer because your cpu use has gone up.
> Your latency numbers have not improved that much (looking at the avg)
> and your throughput is not that much higher. Will i be willing to pay
> more cpu (of an already piggish cpu use by NAPI at that rate with 2
> interupts per packet)?
I view his results much more favorably. With current NAPI, the average
RTT is 104% higher than the minimum, the deviation is 4.659 ms, and the
maximum RTT is 101.727 ms. With his patch, the average RTT is only 24%
higher than the minimum, the deviation is only 0.689 ms, and the maximum
RTT is 28.371 ms. The average RTT improved by 39%, the deviation was
6.8 times smaller, and the maximum RTT was 3.6 times smaller. So in
every respect the latency was significantly better.
The throughput increased from 6200 packets to 8510 packets or an increase
of 37%. The only negative is that the CPU utilization increased from
62% to 100% or an increase of 61%, so the CPU increase was greater than
the increase in the amount of work performed (17.6% greater than what
one would expect purely from the increased amount of work).
You can't always improve on all metrics of a workload. Sometimes there
are tradeoffs to be made to be decided by the user based on what's most
important to that user and his specific workload. And the suggested
ethtool option (defaulting to current behavior) would enable the user
to make that decision.
-Bill
P.S. I agree that some tests run in parallel with some CPU hogs also
running might be beneficial and enlightening.
next prev parent reply other threads:[~2007-09-12 7:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 14:16 RFC: possible NAPI improvements to reduce interrupt rates for low traffic rates James Chapman
2007-09-06 14:37 ` Stephen Hemminger
2007-09-06 15:30 ` James Chapman
2007-09-06 15:37 ` Stephen Hemminger
2007-09-06 16:07 ` James Chapman
2007-09-06 23:06 ` jamal
2007-09-07 9:31 ` James Chapman
2007-09-07 13:22 ` jamal
2007-09-10 9:20 ` James Chapman
2007-09-10 12:27 ` jamal
2007-09-12 7:04 ` Bill Fink [this message]
2007-09-12 12:12 ` jamal
2007-09-12 13:50 ` James Chapman
2007-09-12 14:02 ` Stephen Hemminger
2007-09-12 16:26 ` James Chapman
2007-09-12 16:47 ` Mandeep Baines
2007-09-13 6:57 ` David Miller
2007-09-14 13:14 ` jamal
2007-09-07 21:20 ` Jason Lunz
2007-09-10 9:25 ` James Chapman
2007-09-07 3:55 ` Mandeep Singh Baines
2007-09-07 9:38 ` James Chapman
2007-09-08 16:42 ` Mandeep Singh Baines
2007-09-10 9:33 ` James Chapman
2007-09-10 12:12 ` jamal
2007-09-08 16:32 ` Andi Kleen
2007-09-10 9:25 ` James Chapman
2007-09-12 15:12 ` David Miller
2007-09-12 16:39 ` James Chapman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070912030428.16059af6.billfink@mindspring.com \
--to=billfink@mindspring.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=jchapman@katalix.com \
--cc=jeff@garzik.org \
--cc=mandeep.baines@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ossthema@de.ibm.com \
--cc=shemminger@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).