Server Fault is a question and answer site for system and network administrators. 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'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.

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
taskset does not work with NUMA:… – carillonator May 6 '13 at 21:28
In the meantime it is possible by e.g. echo "0" >/sys/devices/system/cpu/cpu1/online to disable a core completely. – Kellerspeicher Jan 12 at 11:56

There are 2 possible kernel parameters:



I think in your case, maxcpus is the better choice



to the kernel boot option

share|improve this answer
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. – Wade Mealing Aug 9 '11 at 2:15

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.