I am sure this is more of a question related to approach than a tech-how-to. I have 2 processors, each with 2 cores on my machine. I have Software RAID (md0) configured using Linux kernel. Is it possible that I dedicate one chip or any 2 of the 4 cores specific to the software raid management routines, the server has other services to perform for which 2 free cores at any given time would be sufficiently adequate to address. The reason I am asking to have 2 cores dedicated for software raid is probably obvious, for the reasons of dedicated cpu cycles, increased performance, minimum guaranteed levels of (non-blocking) io throughput. The other part to the question is, that I am sure different software raid level implementations require different cpu cycle times, and assuming that my choices are either RAID-4 or RAID-5 or RAID-1+0. Also, if I plan to increase the number of raid devices(like adding more arrays) the number of cores requirement would also increase. How many cores could be dedicated theoretically for each of the raid device(s) for each of the given RAID level?

1 Answer 1


AFAIK, you can only set cpu affinity for user-space processes. Even if it were possible to bind parts of the kernel to specific CPUs, it would undermine the process scheduling and almost inevitably make the system slower.

There's something of a case for this approach in a NUMA box - but not for conventional hardware.

  • You can set CPU affinity inside the kernel; it's sometimes necessary in drivers for a few devices that can only talk to a specific core (I think this is relatively common when it comes to power management). But you have to do this inside the kernel, as far as I know. Dec 7, 2011 at 22:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .