mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jia Rao <rickenrao@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>
Subject: Re: APIC seems not working under high network load
Date: Tue, 03 Jan 2012 21:30:28 +0100	[thread overview]
Message-ID: <1325622628.2611.8.camel@edumazet-laptop> (raw)
In-Reply-To: <CAA8E7hFwvhATa+LAsW4csnUh1gL-tFZVQMO7LN0iQBa6NFj3KQ@mail.gmail.com>

Le mardi 03 janvier 2012 à 14:28 -0500, Jia Rao a écrit :
> Hi all,
> 
> I had scalability issues when running memcached-like workloads in a
> Intel 8-core system. It turned out that under high network load only
> one core handled the interrupts from NIC. In the output of mpstat, one
> of the core was overloaded with 100% %soft time. I tried to echo
> different core ids to /proc/irq/irq#/smp_affinity, it did not take
> effect until I stopped the incoming network traffic. It seems that
> APIC is not distributing interrupts to different cores.
> 
> The below are the details of the testing system:
> OS: Linux 3.1.4 X86_64
> CPU: Intel L5450, quad-core
> NIC: Intel e1000e

If network load is high enough, cpu handling network IRQ stay in softirq
mode (NAPI) and never re-arms interrupt, so no other cpu can handle the
load.

This is why its better to change /proc/irq/irq#/smp_affinity _before_
load starts.

With your kernel, one way to help this cpu exit from softirq is using
RPS (Receive Packet Steering), since packets will be spreaded on several
cpus. Then, later hardware IRQ might be spreaded on other cpus as well.

for n in `seq 0 7`
do
 echo ff >/sys/class/net/eth0/queues/rx-$n/rps_cpus
done

[ If your eth0 has 8 queues ]




  reply	other threads:[~2012-01-03 20:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 19:28 Jia Rao
2012-01-03 20:30 ` Eric Dumazet [this message]
2012-01-03 20:48   ` Jia Rao

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=1325622628.2611.8.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rickenrao@gmail.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

all inboxes | Powered by JetHome®