Tip: Use RunWithAffinity to restrict apps to specific CPU cores

Launch the typical Windows program and by default it'll be able to take advantage of any, or if it's multi-threaded all of your CPU's cores. But it doesn't have to be this way. RunWithAffinity allows you to create shortcuts that will run certain programs on a defined processor core only, and there are situations where that can be very useful.

Some very old games can have problems running on multi-core CPUs, for instance. If you're having problems getting some old favorite to run as it should, then it's worth trying to launch it using one core only -- this just might help.

And if you have a program that you need to run, but it tends to hog more than its share of CPU time, then again restricting it to one core will make a difference. The application will probably take much longer to complete whatever it's doing, but all your other cores will remain free, so you're far more likely to be able to run other programs while it works. (Be careful with this, though. An application shouldn't misbehave if it's assigned to only one CPU core, but this can't be ruled out entirely, so test any programs you restrict this way carefully before you get back to using them as normal. And don't try to restrict any system-critical components at all.)

If you're familiar with the command line then you'll probably know that Windows has a built-in tool to set the affinity of a process already. Essentially you'd create a shortcut to run a command line, something like "c:\windows\system32\cmd.exe /C start /affinity 1 notepad.exe," where the number following "/affinity" tells Windows which core you'd like to use.

RunAffinity is easier to use, though, and so if you don't have the "Start" syntax committed to memory then it may be preferable. All you have to do is choose your executable, select the single core you'd like to use with this program (or "All," as appropriate), and click "Run program" to try it out. If the results are good -- your old game now works properly, say -- then in one more click you can create a shortcut to always launch the program this way: simple.

8 Responses to Tip: Use RunWithAffinity to restrict apps to specific CPU cores

© 1998-2024 BetaNews, Inc. All Rights Reserved. Privacy Policy - Cookie Policy.