Re: irq balancing question

From: Arjan van de Ven
Date: Fri Feb 23 2007 - 10:55:04 EST

> in fact i have two cards, and 4 CPUs, but i was interested in then answer
> Robert gave, that only _some_ machines distribute interrupts in hardware.
> software distribution is obviously not good. consider this scenario:
> you have one machine with 4 cpus, and two ethernet cards with a lot of
> traffic on them. if you bind every card to one cpu, two of them are not used,
> so you really use only half the power. not let's say you have so much traffic
> (with limiting enabled, htb or something), that the two CPUs are on 100% all
> the time, but the other two are doing nothing.
> now if you could balance that to all 4 cpus, you could use all the power AND
> no cpu would be used 100%.

actually this will give you worse performance than only using 2 cores.
The reason for this is twofold
1) If you rotate the irqs, TCP and IP packet fragments will arrive at
different CPUs. This in turn means that a VERY expensive reassembly path
gets taken, compared to local-cpu-only reassembly
2) If you rotate the irqs, you bounce cachelines between the caches ALL
THE TIME, which is also very expensive.

Both make it more likely that you'll be slower than just using only 2

if you want to mail me at work (you don't), use arjan (at)
Test the interaction between Linux and your BIOS via

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at