Solved Setting processor affinity made easy

Tiberius Jonez

New Member
While dual core and quad core processors are a great advance in processing power, many games in XP and Vista run better on a single core. Need for Speed Underground is one such game. In my search to find an easy way to set processor affinity, I found the easy method outlined below. This method is the best I've found and actually WORKS without having to make system-wide changes.

Enjoy!

Here's a tip I use for some games which have problems with dual core. It saves the trouble of [alt][tab] out of the game each time, and I find it easier than creating a batch file. You may have already seen this, if so, the short answer is written in red at the bottom of this post.....

Affinity and priority can be permanently added to an application's shortcut so that you don't have to change it every time you run it.

To begin, create a shortcut to the game on the desktop.

Right click the shortcut and select properties. In the "shortcut" tab, find the line for "target". Copy this in front of the target: C:\Windows\System32\cmd.exe /C START "Need for Speed Undercover" /high /affinity 1. Now, NFS Underground will automatically run in high priority on Core 0.

Here's an example for the game Tombraider Legend which also balks at dual core processing.




The target line originally looks like this:
  • "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    So I change it to this:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
The affinity can be set to any CPU core by changing the number to the corresponding hex value.
1st core = 1
2nd core = 2
3rd core = 4
4th core = 8
5th core = 10 ( hexadecimal 16 )
6th core = 20 ( hexadecimal 32 )

The priority can have any value of either: low, normal, high, realtime, abovenormal, belownormal.



So to run on only the 4th core at high priority you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 8 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    or to run on the 2nd AND 3rd cores with priority realtime you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /realtime /affinity 6 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe" (Since 2+4=6)
Sometimes if the game needs to be run as administrator, then you get an error from not starting in the correct folder. Then also add:
/d "<directory>"
The end result being:
C:\Windows\System32\cmd.exe /C START "Tomb Raider" /d "C:\Program Files (x86)\Tomb Raider - Legend" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"

Finally, you just need to change the icon since this will set it to the CMD icon. From the same window, click "change icon" then browse to the location of the exe.
And if you need to run as admin, click the advanced button and check the box"run as administrator"
 

My Computer

Thank you so much! This works great on old games like Raganarok and Age of Empires. :D
 

My Computer

System One

  • CPU
    3.6 Ghz AMD Phenom II X3 720 BE
    Motherboard
    Gigabyte MA790X-UDP4
    Memory
    4GB OCZ DDR2 800Mhz
    Graphics card(s)
    Asus EAH4850 512MB
    Monitor(s) Displays
    Samsung SyncMaster 2253BW
    Hard Drives
    C: 320GB Seagate SATA D: 720GB Seagate SATA
While dual core and quad core processors are a great advance in processing power, many games in XP and Vista run better on a single core. Need for Speed Underground is one such game. In my search to find an easy way to set processor affinity, I found the easy method outlined below. This method is the best I've found and actually WORKS without having to make system-wide changes.

Enjoy!

Here's a tip I use for some games which have problems with dual core. It saves the trouble of [alt][tab] out of the game each time, and I find it easier than creating a batch file. You may have already seen this, if so, the short answer is written in red at the bottom of this post.....

Affinity and priority can be permanently added to an application's shortcut so that you don't have to change it every time you run it.

To begin, create a shortcut to the game on the desktop.

Right click the shortcut and select properties. In the "shortcut" tab, find the line for "target". Copy this in front of the target: C:\Windows\System32\cmd.exe /C START "Need for Speed Undercover" /high /affinity 1. Now, NFS Underground will automatically run in high priority on Core 0.

Here's an example for the game Tombraider Legend which also balks at dual core processing.




The target line originally looks like this:
  • "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    So I change it to this:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
The affinity can be set to any CPU core by changing the number to the corresponding hex value.
1st core = 1
2nd core = 2
3rd core = 4
4th core = 8
5th core = 10 ( hexadecimal 16 )
6th core = 20 ( hexadecimal 32 )

The priority can have any value of either: low, normal, high, realtime, abovenormal, belownormal.



So to run on only the 4th core at high priority you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 8 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    or to run on the 2nd AND 3rd cores with priority realtime you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /realtime /affinity 6 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe" (Since 2+4=6)
Sometimes if the game needs to be run as administrator, then you get an error from not starting in the correct folder. Then also add:
/d "<directory>"
The end result being:
C:\Windows\System32\cmd.exe /C START "Tomb Raider" /d "C:\Program Files (x86)\Tomb Raider - Legend" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"

Finally, you just need to change the icon since this will set it to the CMD icon. From the same window, click "change icon" then browse to the location of the exe.
And if you need to run as admin, click the advanced button and check the box"run as administrator"
or if you got a Nvidia Graphics card, you could just turn threaded optimization off.
 

My Computer

System One

  • Manufacturer/Model
    Custom Build
    CPU
    Intel Q6600 @ 2.8GHz
    Motherboard
    Evga NF78-CK-132-A 3-Way SLI
    Memory
    8Gb DDR2 Corsair Dominator @ 1066Mhz 5-5-5-15
    Graphics card(s)
    EVGA 560 GTX SC FTW 1GB
    Sound Card
    Realtek ALC888 7.1 Audio, Logitech G35 7.1 Surround Headset
    Monitor(s) Displays
    Dell S2409W 16:9, HDMi, DVI & VGA
    Screen Resolution
    1920 x 1080
    Hard Drives
    Samsung 7200rpm 250Gb SATA, Samsung 7200rpm 750Gb SATA, WD 7200rpm 1TB SCSI SATA.
    PSU
    Xigmatek 750W Quad sli quad core 80% eff
    Case
    Antec 900 Gaming Case
    Cooling
    Zalman CNPS9700-NT NVIDIA Tritium, Dominator RAM cooler
    Mouse
    Razor Lachesis Banshee V2 Blue, 4000DPI
    Keyboard
    Logitech generic keyboard
    Internet Speed
    16Mb Sky bb
    Other Info
    Wireless Gaming Receiver for Windows, Wireless Xbox 360 Pad, Wireless Xbox 360 Les Paul Guitar
FIFA 10 by default runs on one core. Need to use at least 2 cores for better performance. Used the following line on the shortcut target box:

D:\Windows\System32\cmd.exe /C START "FIFA 10" /d "D:\Program Files/EA Sports/FIFA 10" /high /affinity 6 "D:\Program Files\EA Sports\FIFA 10\FIFA10.exe"

Also tried:

D:\Windows\System32\cmd.exe /C START "FIFA 10" /high /affinity 6 "D:\Program Files\EA Sports\FIFA 10\FIFA10.exe"

Game starts but still uses only the first core. I can see priority goes up to high but no core change. What am I doing wrong?


p.s. System root is D: and game is also on D:.
 

My Computer

Back
Top