public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Lunz <lunz@reflexsecurity.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][IO_APIC] 2.5.63bk7 irq_balance improvments / bug-fixes
Date: Wed, 5 Mar 2003 15:46:20 +0000 (UTC)	[thread overview]
Message-ID: <slrnb6c6vb.rm1.lunz@stoli.localnet> (raw)
In-Reply-To: 3E657F33.4000304@pobox.com

jgarzik@pobox.com said:
> Further, for NAPI and networking in general, it is recommended to bind
> each NIC to a single interrupt, and never change that binding. 

I assume you mean "bind each NIC interrupt to a single CPU" here. I've
done quite a lot of benchmarking on dual SMP that shows that for
high-load networking, you basically have two cases:

 - the irq load is less than what can be handled by one CPU. This is the
   case, for example, using a NAPI e1000 driver under any load on a
   > 1 GHz SMP machine. even with two e1000 cards under extreme load,
   one CPU can run the interrupt handlers with cycles to spare (thanks
   to NAPI).  This config (all NIC interrupts on CPU0) is optimal as
   long as CPU doesn't become saturated. Trying to distribute the
   interrupt load across multiple CPUs incurs measurable performance
   loss, probably due to cache effects.
 
 - the irq load is enough to livelock one CPU. It's easy for this to
   happen with gigE NICs on a non-NAPI kernel, for example. In this
   case, you're better off binding each heavy interrupt source to a
   different CPU.

2.4's default behavior isn't optimal in either case.

> Delivering a single NIC's interrupts to multiple CPUs leads to a 
> noticeable performance loss.  This is why some people complain that 
> their specific network setups are faster on a uniprocessor kernel than 
> an SMP kernel.

This is what I've seen as well. The good news is that you can pretty
much recapture the uniprocessor performance by binding all heavy
interrupt sources to one CPU, as long as that CPU can handle it. And any
modern machine with a NAPI kernel _can_ handle any realistic gigE load.

I should mention that these results are all measurements of gigabit
bridge performance, where every frame needs to be received on one NIC
and sent on the other. So there are obvious cache benefits to doing it
all on one CPU.

-- 
Jason Lunz			Reflex Security
lunz@reflexsecurity.com		http://www.reflexsecurity.com/


  reply	other threads:[~2003-03-05 15:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-05  4:21 [PATCH][IO_APIC] 2.5.63bk7 irq_balance improvments / bug-fixes Kamble, Nitin A
2003-03-05  4:38 ` Jeff Garzik
2003-03-05 15:46   ` Jason Lunz [this message]
2003-03-05 18:26 ` Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2003-03-06 20:01 Nakajima, Jun
2003-03-05 19:57 Kamble, Nitin A
2003-03-04 23:33 Kamble, Nitin A
2003-03-04 23:51 ` Andrew Morton
2003-03-05 10:48 ` Kai Bankett
2003-03-04 16:33 Kai Bankett
2003-03-04 16:45 ` Jeff Garzik

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=slrnb6c6vb.rm1.lunz@stoli.localnet \
    --to=lunz@reflexsecurity.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