I'm currently working with an AMD Opteron-based NUMA system. For the needs of my current project, I'd like to make Linux and all of the system processes to utilize only the CPU0 (and preferably, only one of its cores), leaving all other cores for my own egoistic needs. I know that it will really impact system performance, but it is OK now.

So, I'd like to know if it is possible to achieve at all without messing with the kernel source code. Any links to the up-to-date articles about NUMA and SMP implementation details in Linux will be appreciated, too.


leaving all other cores for...

That implies that you want to actually use the other cores.

Before you start using using the other cores, use taskset to apply the affinity for all running user processes (including init). e.g.

taskset 0x00000001 1

Then set the affinity mask to everything else for the process which will launch your "egotistical needs", e.g.

taskset 0xFFFFFFFE $$

You can't force the kernel to run on only one CPU (and it would be stupid anyway) unless you set the boot options which will only allow the system to access a single CPU.


There are 2 possible kernel parameters:



I think in your case, maxcpus is the better choice



to the kernel boot option

  • maxcpus limits the amount of cpu's detected by the operating system for use. I think that you will want to use "isolcpus=N" and then use taskset to migrate the tasks to the free cpus. If you're using red hat Enterprise Linux MRG, you can use "tuna" and taskset. – No Username Aug 9 '11 at 2:15

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.