Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
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. – Gilles Dec 7 '11 at 22:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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