linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Danial Thom <danial_thom@yahoo.com>
To: Erik Mouw <erik@harddisk-recovery.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Measuring tools - top and interrupts
Date: Thu, 22 Jun 2006 16:37:44 -0700 (PDT)	[thread overview]
Message-ID: <20060622233744.99206.qmail@web33314.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060622173128.GD14682@harddisk-recovery.com>



--- Erik Mouw <erik@harddisk-recovery.com> wrote:

> On Thu, Jun 22, 2006 at 09:58:08AM -0700,
> Danial Thom wrote:
> > --- Erik Mouw <erik@harddisk-recovery.com>
> wrote:
> > > 75K packets/s isn't too hard for modern
> NICs,
> > > especially when using
> > > NAPI.
> > 
> > Well thats just a ridiculous answer, so why
> > bother? 
> > 
> > You polling guys just crack me up. There
> isn't
> > much less work to be done with polling. The
> only
> > reason you THINK its less work is because the
> > measuring tools don't work properly. You
> still
> > have to process the same number of packets
> when
> > you poll, and you have polls instead of
> > interrupts. Since you can control the # of
> > interrupts with most cards, there is zero
> > advantage to polling, and more negatives.
> 
> There certainly is less work to be done with
> polling. Less IRQs means
> less expensive context switches, which means a
> lower system load. See
> Documentation/NAPI_HOWTO.txt for information
> and a link to the Linux
> NAPI paper.
> 
> > And 75K pps may not be "much", but its still
> at
> > least 10% of what the system can handle, so
> it
> > should measure around a 10% load. 2.4
> measures
> > about 12% load. So the only conclusion is
> that
> > load accounting is broken in 2.6.
> 
> Network traffic is usually IO bound, not CPU
> bound. The load figures
> top shows tell something about the amount of
> work the CPU has to do,
> not about how busy your PCI bus (or whatever
> bus the NIC lives on) is.
> 
> IIRC the networking layer in 2.6 differs quite
> a lot from 2.4, so the
> load average figures can be quite misleading.

I'm sorry, but you're being an idiot if you think
that 16K interrupts per second and forwarding 75K
pps generate no cpu load. Its just that simple.
It also means that you've never profiled a kernel
because you don't understand where the loads are
generated. You've probably been on too many lists
with too many people who have no idea what
they're talking about.

The NAPI paper is complete rubbish because its
based on a principle which no longer exists: that
is the assumption that you'll get an interrupt
for every packet. Not only is that hardly ever
the case, modern controllers (such as Intel's
GigE controllers) can precisely mitigate the
interrupts in hardware. You *could* tune this on
the fly, but there is really no reason to,
because at low interrupt loads cpu overhead is
not a concern and lower latencies are preferred.
You'll never get an interrupt for consecutive
packets, and since packets usually arrive in
bursts, the mitigation model works even better
than if they arrived randomly.

With simple tuning the controller is more
efficient with hardware interrupts. None of the
arguments in the NAPI paper hold true when using
a modern GigE controller. 

Of course you folks could never really know that,
because the tools to measure things don't work,
and you all seem to be using systems that are so
kludged up that you don't even know what you're
measuring.

DT

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

  reply	other threads:[~2006-06-22 23:37 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 15:26 Measuring tools - top and interrupts Danial Thom
2006-06-22 16:19 ` Randy.Dunlap
2006-06-22 17:16   ` Bernd Eckenfels
2006-06-22 16:21 ` Erik Mouw
2006-06-22 16:58   ` Danial Thom
2006-06-22 17:31     ` Erik Mouw
2006-06-22 23:37       ` Danial Thom [this message]
2006-06-23  8:32         ` Mike Galbraith
2006-06-23 20:14           ` Danial Thom
2006-06-23 22:51             ` Mike Galbraith
2006-06-23  9:02         ` Erik Mouw
2006-06-23 17:13         ` Alistair John Strachan
2006-06-23 18:16           ` Danial Thom
2006-06-23  5:34       ` sena seneviratne
2006-06-23 20:42       ` Danial Thom
2006-06-22 17:57     ` Francois Romieu
2006-06-22 22:47       ` Danial Thom
2006-06-22 23:53         ` Francois Romieu
2006-06-23 20:34           ` Danial Thom
2006-06-23 21:19             ` Francois Romieu
2006-06-24  2:07     ` Björn Steinbrink
2006-06-24  4:39       ` sena seneviratne
2006-06-24  5:59     ` Mike Galbraith
2006-06-24  6:26       ` Mike Galbraith
2006-06-24  9:21         ` Björn Steinbrink
2006-06-24  9:51           ` Mike Galbraith
2006-06-24 11:41             ` Mike Galbraith
2006-06-24 15:40               ` Björn Steinbrink
2006-06-24 16:23                 ` Mike Galbraith
2006-06-24 19:25                   ` Björn Steinbrink
2006-06-25  5:06                     ` Mike Galbraith
2006-06-25 11:12                       ` Björn Steinbrink
2006-06-25 14:24                         ` [PATCH] i386: Fix softirq accounting with 4K stacks Björn Steinbrink
2006-06-25 15:15                           ` Arjan van de Ven
2006-06-25 17:44                           ` Mike Galbraith
2006-06-25 17:43                             ` Arjan van de Ven
2006-06-25 18:42                               ` Björn Steinbrink
2006-06-26  2:23                                 ` Mike Galbraith
2006-06-26  3:05                                   ` Mike Galbraith
2006-06-26 17:58                                     ` Björn Steinbrink
2006-06-27 10:09                                       ` Mike Galbraith
2006-06-25 20:45                         ` Measuring tools - top and interrupts Danial Thom
2006-06-26  2:33                           ` Mike Galbraith
2006-06-30 13:41                             ` Danial Thom
2006-06-30 18:03                               ` Mike Galbraith

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=20060622233744.99206.qmail@web33314.mail.mud.yahoo.com \
    --to=danial_thom@yahoo.com \
    --cc=erik@harddisk-recovery.com \
    --cc=linux-kernel@vger.kernel.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).