March 14, 2020

What is Process Affinity and How to Use It Properly

By Liutilities

The current generation processors are multi-core and offer more value than older processors, which were limited to either single or double core.

If you are using Windows 10 or any other Windows version, then you should know about the process affinity as it will help you better optimize the processor based on your requirements.

If you run a program in Windows, it tends to utilize all the available CPU cores. This is done so that the performance of the program is top-notch. However, this can slow down the system and hamper other apps performance.

That is why, in this article, we will learn about process affinity and how to utilize it effectively. To make things easy to digest, we will be exploring process affinity through Windows 10.

 What is Process Affinity?

Process affinity is a method of assigning CPU cores to a process. It is also known as a CPU pinning. So, what does that mean technically? The process can be bind or unbind to a CPU process or thread. As a user, you will find the option to assign process affinity beneficial, specifically when you are running resource-intensive heavy programs such as video rendering.

 In the case of heavy programs, you can dedicate more cores to the program and help it function faster and smoother. It also gives the CPU the instructions to provide resources to the said program. It also removes the cache problems that are related to the program performance. Generally, some CPU has a lower cache and they could not decide how to use it when running your computer. By manually assigning the CPU process affinity, you are instructing it to use the cache for the program, making it perform way better.

Process affinity is not always beneficial. If you assign cores to a program wrongly, it can distribute the normal load balancing function, slowing the whole system. This means that you should be wary of what you are doing, then you should not do it at all!

Setting Up Process Affinity in Windows 10 

In this section, we will take a look at how to set process affinity in Windows 10. If you are using a different version of Windows, then you can use the tutorial.

Let’s get started.

1) First, you need to open up the Task Manager. You can do so by pressing Ctrl + Shift + Esc. You can also open up it up right-click on the bottom taskbar and then select “Task Manager.” Another way is to press CTRL + ALT + DEL and then select, “Task Manager” from there.

2) Next, click on the Details tab.

task manager details

3) The third step is to select the process that you want to set process affinity for. In our case, let’s pick up chrome.exe — process for the Google Chrome browser.

 4) Right-click on the said process and click on “set affinity.”

set affinity

5) Here, you will see the list of all the threads/cores provided by your processor. Here, you can select/deselect the CPU based on your choice.

processor affinity

 6) Click on “OK” to finalize.

If you are more of an advanced user, then you can also set the process affinity system-wide by editing the boot.ini settings. For instance, if you set the /numproc = 2, then all the programs running on the system will be confined to 2 processes/CPU only, irrespective of how many core processes you are running.

Conclusion

This leads us to then of our process affinity article. If you have any questions, don’t forget to use the comment section below!