4

I'm trying to improve CPU performance in a game, to do this I want to try giving it 2-4 CPU cores that run ONLY that application, and no windows related services. Is there I was where I can set the default affinity for ALL applications, services, processes, ect. on the computer so the core is effectively not in use at all?

3

in powershell:

$instances = Get-Process
foreach ($i in $instances) { $i.ProcessorAffinity=1 }

will make most processes run on first core (core 0 in task manager). Yes it will throw quite many "Access denied" errors for processes it can't change affinity for. just ignore it... for the rest it works.

and then manually or with command set your game to the desired cores, like:

(Get-Process -name doom).ProcessorAffinity = 14

to set your 'doom' game to run on remaining 3 cores on 4 core CPU.

2

This can be partially accomplished with a lot of manual labor. You can set processor affinity through the task manager or from the command line. See this article on how to do it. Unfortunately, this method does not work on services.

However, I do not believe this is going to help you much. While in a game, the OS isnt doing much CPU wise. Of course, this is assuming your arent doing some other task at the same time, but you wouldnt be, since you are complaining about performance. Are all your cores maxing out at 100% when playing the game? I would doubt it. Your performance loss is most likely not CPU bound, but something else, like graphics and/or disk. You need to run a performance moniter (like Windows' perfmon) to really see what is slowing you down.

1

A few other methods to force Windows to run applications on only one core is answered here. That could free up your other three cores for your game. And how to set the affinity for this one manually via taskmgr or cmdline answered Keltari with other useful hints where performance bottlenecks could be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.