Wednesday 27 April 2016

How to limit a process to a single CPU core?



You probably know how to limit processor to a single core for specific process e.g. some games are required to use on single core only to get best performance in such case you can use this one.


If you're running Windows Vista/7 (p ossibly XP, but not sure).
Type in: Control+Shift+Esc to get your taskmanager up.
Click on the Processes tab
Find the process that needs its processor affinity changed
Right-click on the process
Click on "Set Affinity"
Here you can select which processor(s) your process will use.
Good luck!
EDIT: You have to be administrator to get this to work

You can use command Line as well

from the command line, use
start /affinity 1 program.exe
this will run program.exe on the first CPU as "1" is the hex value of the affinity mask
CPU3 CPU2 CPU1 CPU0  Bin  Hex
---- ---- ---- ----  ---  ---
OFF  OFF  OFF  ON  = 0001 = 1
OFF  OFF  ON   OFF = 0010 = 2
OFF  OFF  ON   ON  = 0011 = 3
OFF  ON   OFF  OFF = 0100 = 4
OFF  ON   OFF  ON  = 0101 = 5 
OFF  ON   ON   OFF = 0110 = 6
OFF  ON   ON   ON  = 0111 = 7
ON   OFF  OFF  OFF = 1000 = 8
ON   OFF  OFF  ON  = 1001 = 9
ON   OFF  ON   OFF = 1010 = A 
ON   OFF  ON   ON  = 1011 = B
ON   ON   OFF  OFF = 1100 = C
ON   ON   OFF  ON  = 1101 = D
ON   ON   ON   OFF = 1110 = E 
ON   ON   ON   ON  = 1111 = F 

Entire Windows Session to single core(Vista/7)
  1. Type bcdedit /set onecpu on on a command prompt
  2. Reboot the system.
  3. When you are done playing, type 2 - Type: bcdedit /set onecpu off and reboot again.
For Reference :
http://superuser.com/questions/309617/how-to-limit-a-process-to-a-single-cpu-core

No comments:

Post a Comment

How to install google-chrome in redhat without redhat subscription

Install google-chrome in redhat  Download the .rpm file of chrome https://www.google.com/chrome/thank-you.html?installdataindex=empty&st...