Setting Process Affinity

Written by Eric Wyatt (last updated June 3, 2019)

1

For many computers today, it is not uncommon to have either a multi-core processor or multiple processors installed. This helps you tremendously when you run a program designed to take advantage of multiple cores. However, this is not always the case, as some programs (especially some older ones) work better when they are running on a single- or even dual-core system. (This all depends on how the program was written.)

If your computer has multiple cores or processors, Windows will, by default, try to use all the processing power at its disposal to run those programs. This can create an issue when one program is trying to use all the power from all of the cores, causing the rest of the computer to slow to a crawl.

Setting the Process Affinity for a program is a way to designate a program or process to only run on a set number of cores, saving the other cores for the other programs. To set the affinity of a program or process follow these steps:

  1. Right-click on the Task Bar and choose Task Manager from the resulting Context menu. (Make sure you right-click on a blank area of the Task Bar, not on a task icon that may be on the Task Bar.) Windows opens the Task Manager window.
  2. Click on More Details in the bottom-left corner of the window. Windows displays the detailed view of the Task Manager.
  3. Click on the Details tab to show the details of the apps and processes running on your system. (See Figure 1.)
  4. Figure 1. The Details tab of Task Manager.

  5. Right-click on the application or process for which you wish to set the affinity and choose Set Affinity from the resulting Context Menu. Windows displays the Processor Affinity window. (See Figure 2.)
  6. Figure 2. The Processor Affinity window.

  7. Use the check boxes to specify the core (or cores) you want the application or process to use.
  8. Click on OK to close the Processor Affinity window.
  9. Once you are done with all the processes you wish to change close the Task Manager.

Next time you launch the program(s) you modified, the settings you selected will take effect. As you set the affinity for each program it is helpful to know that when Windows lists the CPUs, 0 is actually core 1. In my example above, my computer has four cores shown as CPU 0, CPU 1, CPU 2, and CPU 3. Keep in mind that a program designed for multiple cores will not perform well if you set it to use only one core. As you set up the Process Affinity for your programs, it's important to keep track of how your computer responds to the changes you implement.

 This tip (13637) applies to Windows 10.

Author Bio

Eric Wyatt

Eric Wyatt is a swell guy (or so his friends tell him). He is a formally trained designer and branding expert, bringing a wide range of skills to his Tips.Net articles. ...

MORE FROM ERIC

Use Cmd to Find Your Computer Serial Number

You can access your computer's serial number without looking all over on the outside of the box. Use the Command prompt ...

Discover More

Quickly Finding Your IP Address

IP addresses identify your device on IP-governed networks. If you need to find your IP address quickly, you can use the ...

Discover More

Recording Video with the Xbox Game Bar

You can use Xbox Game Bar to record videos of applications running on your system. Let's see how to capture a video of ...

Discover More
More WindowsTips

Share with a Nearby Computer

Have you ever needed to quickly share something with another computer? With Nearby Sharing, part of the Windows 10 April ...

Discover More

Modifying the Number of Jump List Items

Jump lists can be a helpful tool to quickly access common files and commands. If you'd prefer to display a different ...

Discover More

Using the Device Manager

If you want granular control over all the devices on your system, getting familiar with the device manager is time well ...

Discover More
Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

2019-06-03 13:50:25

Jim Hensinger


Thank you for the tip.

I have probably a hundred processes running.

This tip is not helpful without a clear explanation of how to determine the optimum number of cores to assign to any process.


Newest Tips