Okay check this out: Right now, open the Task Manager, press Ctrl + Shift + Esc, zip over to the Details tab and right-click a random process.
If you’re using Windows 7 or Vista, forget about the Details tab. You can just right click a process in the Process tab to see the same result.
Most people who use the Task Manager are familiar with the End Process command but what does that Set Affinity… thing do?
I’m a curious guy and I’ve occasionally wondered about this apparently enigmatic option.
I mean, “Affinity” isn’t a word we hear a lot of these days but even a quick dictionary look-up didn’t tell me how it pertains to my computer.
Clicking the Set affinity option gives us a clue.
So this has something to do with my CPU cores.
I ran a quick WMIC command to see how many logical cores I have:
Okay, so I actually have 8 logical cores; thus, it appears that the Set Affinity command let’s me assign a particular processor to one or more cores.
And that’s actually what it does.
According to Microsoft, the Set Processor Affinity command allows you to manually assign a particular process to have affinity or kinship with a specific processor.
Now you might be asking why would you ever do this?
The short answer is that you would never need to do this.
The engineers on the Windows development team designed Windows so that it automatically identifies indolent processors needing work. The processors doing the least amount of work are eligible to start working on new applications as they appear in memory. If you manually link an affinity to a specific process then even when the CPU get’s busy Windows can’t allocate it to another CPU with a lighter load. So as you can imagine, this could actually limit the performance of your system.
The bottom line is that the Set Affinity command is rarely used but even when it is, it’s usually employed by developers who are working on real-time systems such as factory automation.
Unless you’re setting up performance benchmarks for a specific application or you’re trying to run a single-threaded legacy application on a multi-core system, you really shouldn’t expect to tweak the affinity values.
I know there are a few sites out there that claim you can boost your performance by messing with the affinity values. I agree that there may be some merit to this if you know what you’re doing but I think the best thing for all of us is to simply let Windows be Windows and manage its processor affinities for us.
If you’re looking to boost your system performance, there are a number of safer more effective things you can do to make that happen.
Have you ever used the Set Affinity value? If so I’m curious what you were using it for. Please share in the comments!