Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - Processor Affinity - Set for Applications



 

Processor Affinity - Set for Applications

How to Set Processor Affinity to an Application in Windows 7
Published by Brink
05-09-2010
Default Processor Affinity - Set for Applications

How to Set Processor Affinity to an Application in Windows 7

information   Information
By default, Windows 7 and Vista runs an application on all available cores of the processor. If you have a multi-core processor, then this will show you how to set affinity to an application to control which core(s) of the processor an application will run on.

If the application and CPU supports Symmetric Multiprocessing (SMP) or HyperThreading (HT), then Windows will automatically adjust the application's usage of each processor core for the best performance. You will not gain much, if anything, from manually changing the processor affinity for these type od applications.

It is strongly NOT RECOMMENDED to change the Process Affinity for System Processes.

Note   Note
The affinity changes you make to the current instance of an application or process are only temporary and not set permanently.

Once you close the application or restart your system, Windows forgets your set affinity and automatically sets back the default affinity of the application running on all available cores of the processor.




Here's How:
1. Right click on a empty space on the taskbar and click on Task Manager, OR press CTRL+SHIFT+ESC.

2. If UAC Permission is Required to Run the Application
A) Click on the Processes tab in Task Manager, then click on the Show processes from all users button. (see screenshot below)
Processor Affinity - Set for Applications-step1.jpg
B) If prompted by UAC, then click on Yes (if administrator) or enter the administrator's password (if standard user).

C) Continue on to step 3
3. Click on the Applications tab, then right click on the application that you want to set processor affinity of and click on Go to Process. (see screenshot below)
[Processor Affinity - Set for Applications-step2.jpg
4. In the Processes tab, right click on the application's process, then click on Set Affinity. (see screenshot below)
Processor Affinity - Set for Applications-step3.jpg
5. Check or Uncheck which CPU processor core(s) you want to be allowed or not allowed to run the application on, then click on OK. (see screenshot below)
NOTE: CPU-0 = Core 1, CPU-1 = Core 2, etc.......
Processor Affinity - Set for Applications-step4.jpg
6. Repeat for any other applications that you wish to change the processor affinity for.

7. When finished, close Task Manager.
That's it,
Shawn




Published by
Administrator

Join Date: Oct 2008
Location: Texas
Posts: 34,826
Brink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond repute
Brink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond reputeBrink has a reputation beyond repute

Tutorial Tools
07-13-2010   #1
601122


Windows 7
 
 


I don't have an option in my processor drop down menu to change the affinity setting. A fix to an issue I am having from other forums is to change this but there is nothing under set priorty. Any ideas??

My System SpecsSystem Spec
07-13-2010   #2
Brink


Windows 7 Ultimate x64 SP1
 
 


Hello 601122, and welcome to Seven Forums.

Is the Set Priority menu empty for all of the listed proccesses, or just this one?

For now, you might see if running a sfc /scannow command may be able to help.
My System SpecsSystem Spec
07-13-2010   #3
601122


Windows 7
 
 


As you can see there is no option under the set priority to change the Affinity setting. My knowledge is very basic.

Thanks
Attached Thumbnails
Processor Affinity - Set for Applications-screenshot.jpg  
My System SpecsSystem Spec
.


07-13-2010   #4
Brink


Windows 7 Ultimate x64 SP1
 
 


601122,

I know this may seem silly, but did you move the mouse pointer over Set Priority to expand the arrow menu?
My System SpecsSystem Spec
07-14-2010   #5
601122


Windows 7
 
 


Hi thanks for assistance, yes it gives 6 options, real time, high, above normal, normal, below normal and low. Cheers.
My System SpecsSystem Spec
07-14-2010   #6
Brink


Windows 7 Ultimate x64 SP1
 
 


That's great news. You're most welcome.
My System SpecsSystem Spec
07-15-2010   #7
mickey megabyte


ultimate 64 sp1
 
 


you can 'permanently' set a program's affinity by creating a .bat batch file in the same folder as the program, with the contents:

Code:
start /affinity 1 program_name.exe
this will force the software to use only cpu core 0. use ... /affinity 2 ... to specify cpu core 1 etc

you should then modify the program's start-menu and/or desktop shortcut to point to your newly created batchfile.

a tiny drawback is that you will see a small cmd window briefly flash on the screen before your program opens.

-------------------------------------------------------

for extra performance, you can add /high to give the application a higher cpu priority.

Code:
start /affinity 1 /high program_name.exe
(Brink, if you can rewrite this to make it clearer, then please do. )
My System SpecsSystem Spec
Comment

Processor Affinity - Set for Applications problems?



Tutorial Tools



Similar Threads for: Processor Affinity - Set for Applications
Windows 7 Tutorial Category
All games crash unless I set affinity - 2 cores Gaming
How to set affinity for Media Center? Media Center
Processor Intensive Applications Crash PC Crashes and Debugging
Processor Affinity - Add Set Affinity to Context Menu Tutorials
Set affinity in task mgr as default Performance & Maintenance


All times are GMT -5. The time now is 03:41 AM.



Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30