How to set Affinity in Task Manager
By Koder at Wed, 02/02/2011 - 19:10
If you are a Windows user, you must be familiar with our friend the Task Manager, it has long been around since Windows NT days. Task Manager can be called to help or diagnose an unresponsive machine or simply to gather information. Primarily, most users go to the task manager to check the performance of their machine or to kill an ailing process or kill an offending application that's taken over your machine's resources. In this article we will show you how you can use the "Set Affinity" function of the task manager to prevent problems with resources in future. If you find that you have to run a piece of software or process that can be a resource hog (such as ripping DVDs or rendering video and graphics etc), which will make your whole operating system slow, you can use.
The Set Affinity feature in Task Manager that only works for machines that have multiple CPUs or Multi Core CPUS, machines with multi core and multi cpus are fairly common these days. In our example, we will use a dual core machine with two CPUs to demonstrate the Set Affinity property of the task manager for controlling an application that is taking too RAM and making us feel as if our machine has hung or crashed. For machines that do not have multiple cpus, you can only use the "set priority" feature for an application.
1. You can call the task manager either by right clicking anywhere on the Windows Taskbar or hitting ctrl+alt+del on your machine and choosing Start Task Manager
2. Task Manager Launches
3. Click on the processes tab and sort by memory by clicking on the Memory column. In this case we can see that the FireFox application is taking a lot of Memory and CPU which is taking resources away for the normal operating system and other tasks
4. Right Click on FireFox and choose Set Affinity
5. Choose Only CPU 0 to execute the FireFox application in the Set Affinity properties and click ok
That should be it now, from now on FireFox application will only be allowed to use CPU 0 out of the available two CPUs for doing its intensive work. This will leave CPU 1 to be available for other system and operating system related tasks, so to make you feel that your machine has not "crashed" or hung in case any rogue process or application takes over all the resources on your machine.