mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* APIC seems not working under high network load
@ 2012-01-03 19:28 Jia Rao
  2012-01-03 20:30 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Jia Rao @ 2012-01-03 19:28 UTC (permalink / raw)
  To: linux-kernel

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

Thanks !

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: APIC seems not working under high network load
  2012-01-03 19:28 APIC seems not working under high network load Jia Rao
@ 2012-01-03 20:30 ` Eric Dumazet
  2012-01-03 20:48   ` Jia Rao
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2012-01-03 20:30 UTC (permalink / raw)
  To: Jia Rao; +Cc: linux-kernel, netdev

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 ]




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: APIC seems not working under high network load
  2012-01-03 20:30 ` Eric Dumazet
@ 2012-01-03 20:48   ` Jia Rao
  0 siblings, 0 replies; 3+ messages in thread
From: Jia Rao @ 2012-01-03 20:48 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: linux-kernel, netdev

> 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
It seems that my NIC only have one queue: rx-0. Is there a work around
for this ?
As for the softirq, is it possible migrating the softirq to other
cores through CPU load balancing ?

Thanks !

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-03 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-03 19:28 APIC seems not working under high network load Jia Rao
2012-01-03 20:30 ` Eric Dumazet
2012-01-03 20:48   ` Jia Rao

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®