Setting permanent process CPU core affinities in Windows

Generally you will not notice the effects of putting particular processes on particular cores as Windows is generally pretty good at scheduling items between cores, especially on Windows 7 which was designed with this kind of thing in mind.

I have found that in general a busy task will spend most (generally >60% for normal apps and >95% for single threaded games) of it's time on one core and Windows will schedule other tasks on other cores as things get busier so I wouldn't worry about it. I seem to remember reading that windows 7 is able to tell which cores are "preferred" in a system, so on an Intel system that uses their Turbo Boost feature (which uses the activity on the first core to tell if it needs to boost) and Hyperthreading then Windows will tend to schedule single threaded tasks on the first core and then multithreaded tasks will preferentially be assigned to the "real" cores before the hyperthreaded "virtual" cores. I've seen this at work on my i7 (quad-core, 8 hyperthreaded cores) and it works pretty well with games almost exclusively using the first core and then moderate use on the alternate "real" cores.

The only time that I find specifying the affinity to be useful is when watching video using certain media players that are multiprocessor friendly but seem to have timing issues. Mediaplayer Classic Hometheater Edition seems to "jump" quite a lot when you start skipping forward in a video, presumably because it is using multiple threads to decode and they aren't well synchronised across cores and in that case setting it to only use one cpu stops the jumping.

In case you do need to change CPU affinity there are a couple of tools:

Runfirst helps to fix older programs by making sure they only run on the first cpu available in the system.

This review on Toms Hardware has a tool that will automatically reassign task affinities for you, but the link they have seems to be broken, and it appears to be a bit difficult to find these days. I think this program has to be kept running all the time you want it to be assigning affinities. Looks like you might be able to get it here

In general though I do not think you will see any real benefit to manually assigning affinities and I think the practise has pretty much died out as software has gotten better.

I would honestly expect that 8GB of ram would be more than enough to suit your needs, but I've no real experience using the tools you are using. I can say that on a 6GB system I have never had the system feel slow due to hard drive thrashing when I've been running multiple virtual machines and an IDE (eclipse) running...


Assigning CPU affinities to specific executables is a bad idea. Setting affinity on a process doesn't reserve a CPU for that process you specify, locking out all other processes from that CPU. It just says that that process can only use the designated CPU.

That's a problem because there are far more processes needing CPU time than the ones you're normally aware of. If you use affinities to bind a process to say, CPU 0, and something else is using CPU 0 when your process happens to need CPU, your process can't run at all until the something else is done with CPU 0.

It's much better to run somewhere than nowhere, and running nowhere is a common result of setting affinities.

Another horrible result of setting affinity on a process to a single CPU is that you confine all of that process's threads to the one CPU. Thereby killing any performance advantage that multithreading might have had.

In short, just let the Windows scheduler do its thing. The fewer options you let it have, the poorer a job it can do.