Re: CPU Affinity Made Easy | | short addition to this guide. the numeric parameter after /affinity is a hexadecimal parameter like stated earlier, but it's not as straightforward as 1,2,3,4,5...
if you know how ownership modes (chmod) codes work then this will be a breeze:
1st core = 1
2nd core = 2
3rd core = 4
4th core = 8
5th core = H ( hexadecimal 16 )
6th core = 1H ( hexadecimal 32 )
now if you want something to run on just one core, you pick the right number like this, just multiply by 2 until you get to the core you want.
if you want something to run on two cores, you ADD their values:
1st and 2nd core = 1 + 2 = 3
1st and 3rd core = 1 + 4 = 5
2nd and 3rd core = 2 + 4 = 6
2nd and 4th core = 2 + 8 = 10
Same thing if you want more than two cores, just add each core numerical value up and use the sum as the /affinity parameter
Tested and retested on a 8 core system.
HTH |