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

Historical Weather Information

Historical Weather information can give you insight into what you can expect when it comes to temperature, rainfall, and ...

Discover More

Draw Where You Want to Go

When you need directions to just get to a certain general area, you can quickly use the Map app to get you there without ...

Discover More

Enable Edge's Kids Mode

The internet is full of age-inappropriate content. You can use Edge's built-in Kids Mode to protect young ones from ...

Discover More
More WindowsTips

Moving and Sizing Windows Using the Keyboard

Moving and sizing windows is a normal part of using the Windows operating system. There are times when you may want to do ...

Discover More

Currency Conversions

The need for currency conversions is an increasing need in a more connected world. The calculator found within Windows 10 ...

Discover More

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
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 2 + 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