In an SMP and with a fair scheduling algorithm I'd expect all physical cores of a machine to get used evenly by linux. In theory I believe this is the case, but in practice I suspect not.

Does anyone have any good explanations why an average linux setup might favour core 0 for certain processes? Is that realistically possible? You may assume that processor affinity for all user space processes is bitmasked to 0xFFFFFFFF. No custom changes made to the kernel either.


By default, interrupts would be handled by CPU0. So even with all apps spread fairly across cores, core0 would get more work. See for example irqtune for spreading interrupts too.

  • Interesting. I'd had a stab in the dark that it would be interrupt related but I wasn't sure exactly how the kernel handled the top half interrupts. This would explain a lot as the type of work I'm doing is very network intensive, thus I'd expect a lot of interrupts for packet handling. So just to be clear, when registering an interrupt handler in the kernel, the thread which the interrupt is registered on is irrelevant, i.e. the kernel always handles on core 0 (or perhaps come configurable core but always a single one)? Aug 17 '16 at 9:39
  • 1
    Having found this: serverfault.com/questions/446173/… it seems things are more complex. Need to do some reading up here it seems. Aug 17 '16 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.