From: Greg Banks <gnb@sgi.com>
To: jamal <hadi@cyberus.ca>
Cc: Andi Kleen <ak@muc.de>, Greg Banks <gnb@sgi.com>,
Arthur Kepner <akepner@sgi.com>,
"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
netdev@oss.sgi.com, davem@redhat.com
Subject: Re: NAPI, e100, and system performance problem
Date: Sat, 23 Apr 2005 09:28:31 +1000 [thread overview]
Message-ID: <20050422232831.GB6462@sgi.com> (raw)
In-Reply-To: <1114193902.7978.39.camel@localhost.localdomain>
On Fri, Apr 22, 2005 at 02:18:22PM -0400, jamal wrote:
> On Fri, 2005-22-04 at 19:21 +0200, Andi Kleen wrote:
> > On Fri, Apr 22, 2005 at 08:33:15AM -0400, jamal wrote:
> [..]
> > > They should not run slower - but they may consume more CPU.
> >
> > They actually run slower.
> >
IIRC I saw a similar but very small effect on Altix hardware about 18
months ago, but I'm unable to get at my old logbooks right now. I
do remember the effect was very small compared to the CPU usage effect
and I didn't bother investigating or mentioning it.
> Why do they run slower? There could be 1000 other variables involved?
> What is it that makes you so sure it is NAPI?
At the time I was running 2 kernels identical except that one had
NAPI disabled in tg3.c.
> There is only one complaint I have ever heard about NAPI and it is about
> low rates: It consumes more CPU at very low rates. Very low rates
> depends on how fast your CPU can process at any given time. Refer to my
> earlier email. Are you saying low rates are a common load?
>
> The choices are: a) at high rates you die or b) at _very low_ rates
> you consume more CPU (3-6% more depending on your system).
This is a false dichotomy. The mechanism could instead dynamically
adjust to the actual network load. For example dev->weight could
be dynamically adjusted according to a 1-second average packet
arrival rate on that device. As a further example the driver could
use that value as a guide to control interrupt coalescing parameters.
In SGI's fileserving group we commonly see two very different traffic
patterns, both of which must work efficiently without manual tuning.
1. high-bandwidth, CPU-sensitive: NFS and CIFS data and metadata
traffic.
2. low bandwidth, latency-sensitive: metadata traffic on SGI's
proprietary clustered filesystem.
The solution on Irix was a dynamic feedback mechanism in the driver
to control the interrupt coalescing parameters, so the driver
adjusts to the predominant traffic.
I think this is a generic problem that other people face too, possibly
without being aware of it. Given that NAPI seeks to be a generic
solution to device interrupt control, and given that it spreads
responsibility between the driver and the device layer, I think
there is room to improve NAPI to cater for various workloads without
implementing enormously complicated control mechanisms in each driver.
> Logic says lets choose a). You could overcome b) by turning on
> mitigation at the expense of latency. We could "fix" at a cost of
> making the whole state machine complex - which would be defeating
> the " optimize for the common".
Sure, NAPI is simple. Current experience on Altix is that
NAPI is the solution that is clear, simple, and wrong.
> >> Note, this would entirely solve what Andi and the SGI people are
> >> talking about.
> >
> > Perhaps, but Linux has to perform well on old hardware too.
> > New silicon is not a solution.
Agreed.
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
next prev parent reply other threads:[~2005-04-22 23:28 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-18 6:11 NAPI, e100, and system performance problem Brandeburg, Jesse
2005-04-18 12:14 ` jamal
2005-04-18 15:36 ` Robert Olsson
2005-04-18 16:55 ` Arthur Kepner
2005-04-18 19:34 ` Robert Olsson
2005-04-18 20:26 ` jamal
2005-04-19 5:55 ` Greg Banks
2005-04-19 18:36 ` David S. Miller
2005-04-19 20:38 ` NAPI and CPU utilization [was: NAPI, e100, and system performance problem] Arthur Kepner
2005-04-19 20:52 ` Rick Jones
2005-04-19 21:09 ` David S. Miller
[not found] ` <20050420145629.GH19415@sgi.com>
2005-04-20 15:15 ` NAPI, e100, and system performance problem jamal
2005-04-22 11:36 ` Andi Kleen
2005-04-22 12:33 ` jamal
2005-04-22 17:21 ` Andi Kleen
2005-04-22 18:18 ` jamal
2005-04-22 18:30 ` Andi Kleen
2005-04-22 18:37 ` Arthur Kepner
2005-04-22 18:52 ` David S. Miller
[not found] ` <Pine.LNX.4.61.0504241845070.2934@linux.site>
2005-04-25 11:25 ` jamal
2005-04-25 18:51 ` David S. Miller
2005-04-25 11:41 ` jamal
2005-04-25 12:16 ` Jamal Hadi Salim
2005-04-22 19:01 ` jamal
2005-04-22 19:07 ` David S. Miller
2005-04-22 19:21 ` jamal
2005-04-23 20:50 ` Robert Olsson
2005-04-23 16:56 ` Robert Olsson
2005-04-22 23:28 ` Greg Banks [this message]
2005-04-22 23:40 ` Stephen Hemminger
2005-04-22 23:43 ` David S. Miller
2005-04-23 2:51 ` Stephen Hemminger
2005-04-23 17:54 ` Robert Olsson
2005-04-23 3:04 ` jamal
2005-04-23 17:14 ` Robert Olsson
2005-04-22 14:52 ` Robert Olsson
2005-04-22 15:37 ` jamal
2005-04-22 17:22 ` Andi Kleen
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=20050422232831.GB6462@sgi.com \
--to=gnb@sgi.com \
--cc=ak@muc.de \
--cc=akepner@sgi.com \
--cc=davem@redhat.com \
--cc=hadi@cyberus.ca \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@oss.sgi.com \
/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).