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

Using the Voice Recorder

Windows 10 includes the new Voice Recorder app. Ideal for recording lectures, cute things your kids say, musical ...

Discover More

Changing the Text Cursor Indicator

Windows 10 allows for customization of the Text Cursor Indicator. With simple customization options you make the ...

Discover More

Listening with One Ear

If you use a single speaker to listen to your computer audio, you may be missing out on some sounds. Two quick changes to ...

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

Ending a Frozen Program

Sometimes a program can get "stuck," meaning it is no longer responsive and appears to be doing nothing at all. You can ...

Discover More

Finding Your Wi-Fi Password

Connecting devices to your wireless network is generally easy, you select the network and enter the password. But, what ...

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 three 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