I have quad core CPU with hyper threading enabled. So I have 8 logical cores. I want to limit my application to use only 4 cores and I want this 4 cores to be different physical cores. Which taskset options (core numbers) should I use? :
- taskset -c 0,1,2,3 command
or - taskset -c 0,2,4,6 command
Thank you.
Best Answer
You can see which cores are on which processors by taking at look at
/proc/cpuinfo
. For example, you will see on a machine with a dual core cpu:for the first core on the processor and:
on the second.
So, generally speaking, I think you would want:
or: