BE OPC - Crashes and process takes 100% CPU timeIn Windows XP and Windows Vista, applications by default run on all available cores of the processor, if you have a dual or quad core processor, then you can set affinity to an application to control which core of the processor an application can use, in this way you can assign one application or a program to use only one processor while other application can run on other processor. Processor Affinity is the process by which particular tasks on the computer are scheduled and accomplished. A computer’s processor (CPU) creates a queue for tasks to be performed and determines, by level of importance, which tasks should be performed first and which can be performed later. To change these settings, you must adjust your computer’s processor affinity.
If you have a dual-core processor, you may discover that certain older applications that ran fine on systems with a single core CPU have problems running with two cores. For example, your application may suddenly begin maxing out the CPU usage at 100 percent, appearing to lock up.The setting allows you to work around such problems by configuring older applications to use only one of the cores.
Although you cannot set priority to system services but you can set affinity to applications like Google Chrome, Firefox or any Anti-Virus, in this way you can achieve a good overall performance.
Steps to set set affinity to applications in Windows XP- Press Ctrl+Alt+Delete to open Windows Task Manager, and go to the Processes tab and look up for the process name that you want to set the affinity for. If you don’t know which process is associated with which application, go to the Applications tab and right-click on the application name and select Go To Process.
- In the Processes tab the specified process will be highlighted. Now right-click on the process and select Set Affinity.
- In the Processor Affinity dialog, you will see 32 check box options, only the number of cores in your processors will be available to set affinity to.core
- In a single dual core system you’ll see CPU 0 and CPU 1, from here you can check or uncheck the core you want the application to use.
Steps to set set affinity to applications in Windows Vista- Press Ctrl+Shift+Esc to open Windows Task Manager.
- On the Processes tab, at the bottom click on Show processes from all users button.
- Right click the process (application) whose processor affinity you want to change and choose Set Affinity. Now Check the CPU(s) that you want the process (application) to run on and click OK
Limitations on assigning processor affinities in windows vista:It is however recommended to not change the process affinity for Vista system file processes, to avoid potential problems.
- You can instead change the process affinity, only for application processes, to be safe.
The processor affinity setting you make for an application will only last as long as the application is open. If you close the application or restart the computer, then the processor affinity will return to the default i.e. automatically using all CPUs, for that application. - If the installed application supports Symmetric Multiprocessing (SMP) or HyperThreading (HT), then Vista will automatically adjust the application’s usage of each processor for best performance. You will not gain much, by manually changing the processor affinity for those applications.
Set Processor Affinity in Windows Vista or in XP using Command Prompt.- Go first to “Run” from the Start menu and type “cmd” to enable processor affinity for a particular application.
- Type “cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/[insert application name]/SMPAffinitized TRUE” at the command prompt.
- Type “cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/[insert name of application pool]/SMPProcessorAffinityMask [insert mask value]” at the command prompt to bind a particular application permanently to a specific processor.
Note:- If you have more than one processor, you can assign processor affinity for a specific program permanently to a specific processor. If you do not do this, you will be asked to choose which processor you want to run the program with every time you use it.
- The mask value is the hexadecimal value of the processor to which you wish to bind the application.
- Setting processor affinity does not depend on what operating system you use. The procedure is basically the same whether you use Windows Vista or a different version of Windows.
- Hexadecimal codes for mask values begin with 0x and are followed by either a letter or number, or a binary value, such as 0xF or 0×11110000.
- Soft processor affinity determines automatically which processor should run a particular program, based usually on the processor that ran the program the last time. Hard processor affinity allows you to specify which processor you want a program to run on specifically. Windows Vista runs on soft affinity.
- Do not mess around with your processor affinity unless you are well versed in computers and know what you are doing. Otherwise you could change some of your settings drastically and not be able to put them back. If you would like to change your processor affinity but are confused about how to do it, ask a professional to help you.