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

Quick Event Creation

Windows 10 November 2019 update provides a quick method to add a calendar event. This new method allows you to create an ...

Discover More

Win+E Shortcut Result

Configuring your computer is the best way to get your computer to behave the way you want. Here's how you can change what ...

Discover More

Illegal Windows Names

When it comes to files and folders and naming them in there are restrictions. Knowing what is restricted will help you ...

Discover More
More WindowsTips

What are Modern Apps?

The capabilities of apps changed with Windows 10. What, exactly, are modern apps and how are they different from earlier ...

Discover More

Understanding Windows Aero

Windows Aero, first introduced with Windows Vista, provides a nice visual experience when working on your computer. And ...

Discover More

Determining if You Have 32-bit or 64-bit Windows

There are occasions when you may want to know whether you're running the 32-bit or 64-bit version of Windows. This tip ...

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 four less than 4?

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