Linux CPU – How to Set Processor Affinity of a Process

cpulinuxprocess

How can I set the processor affinity of a process on Linux?

Best Answer

I have used taskset for this. If you have taskset installed, something like:

taskset -cp 0,2 45678

would set the process with id 45678 to have an affinity to cpus 1 and 3.

Related Question