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

Disabling the Windows 10 Blurred Sign-on Screen

The later updates to Windows 10 introduced blurred background images on the sign-in screen. If you prefer to have the ...

Discover More

Getting Started with the Xbox Game Bar

Xbox Game Bar is more than just for use in the Xbox ecosystem. What settings correlate to using Xbox Game Bar? Read on to ...

Discover More

Check your PC's Uptime with PowerShell

Every time a computer restarts, it runs through processes that help its performance. You can use PowerShell to see how ...

Discover More
More WindowsTips

Allowing Remote Desktop

Remote Desktop allows you to access other systems and operate them from your own system. If you want to use this ...

Discover More

Understanding the Start Menu Search Box

The Start Menu Search Box is a great addition to Windows. It can save you a great deal of time by putting frequently used ...

Discover More

Which Version of Windows am I Running?

With Windows it has always been helpful to know what version you are running. With Windows 10 knowing the version isn't ...

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 one less than 2?

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