|
Affinity - Telling the Operating System which program can run on which processor or processors. |
"Processor Affinity means a process or program is running on single or multiple processors when there are more than one processors on a motherboard."
Note: The numbering of processors starts at zero, that is a quad
processor will be: the first processor is number 0 and the fourth processor is number 3.
Normally when you start a program or when the computer starts and loads drivers and utility programs they will run on all processors in a multi processor environment.
Depending on your computer and the computers job most people will not worry about setting which processor is running what driver or program.
Where setting the it for a process (the program, associated dll's, and utility programs) will help with the overall performance of your computer would be when a program is a processor intensive. Such as a data base program or your virus scanner.
Multitasking Operating Systems (such as Windows and Mac OSx) schedule a
program to run for a certain length of time. This is called processor time
sharing or as the geeks say "time slices" (not sure where that came from), each
program will get a certain amount of time to run on the processor. Multi
processors reduce this time scheduling by giving some programs more time than
others, you could also do this by changing the priority for a program to run -
NOTE: I do not recommend changing the priority of a program above NORMAL! doing
so will lockup your computer.
By setting the program to run on one or two processors in a multi processor environment will free up other processors to do other tasks and will enhance the over all performance of your computer.
Such as my Core 2 Quad, I use
a program to set the affinity of all
services, drivers, and utility programs that run on startup. I set these
programs to run on the 0 (zero) processor because these processes are constantly
being used by the OS.
Next I set processor intensive processes to run on one or two other processors such as AVG or Trojan Hunter to processors 2 and 3. Because these programs only run once a day the performance hit while they are running their scans is not noticeable.
When I run other programs such as MS Front Page or Macromedia I run those on processors 1 and 2 leaving the 0 and the number 3 processors open for other programs.
Some programs I let run on all four processors, some of these programs only run for a short time and are not processor intensive. Others work better when
it is not set, such as my video editing program or when I play games.
The 5 Steps to high quality and cheap
DIY Computer Repairs
Get It Today...
|
|
To set it for a program (not a service) you can use the task manager, go to the process tab, highlight the program that you want to set
it on, right click and select affinity, a new window will open listing all the processors in your computer. Select the processor or processors you want the program to run on.
Now this is only good for the current session, when you log off or restart the computer
it is once again at the default of all processes running on all processors.
So how do you get around this problem of not being able to set it on services
and programs that are locked? And have them set automatically when the computer
starts? You could change some of the properties on the program in the registry which could cause problems or a BSOD.
I do not recommend modifying registry settings unless you know and understand
what you are doing.
With a program you can set it and have run on start up, you will have to do a
search for a program such as Set-Affinity II (which is no longer available).
Update 02-08-20
Pervious versions of Microsoft Windows prior to Windows 7 you could find
programs that would do the work for you in setting the Affinity of a program for
certain processors on startup of the computer.
When Windows 7 came out the programmers decided to not create programs
for doing this for you. I have done some research for such programs but the only
thing I can find is ways to set the affinity with a shortcut when the program is
started.
However I will not list these links and let you do the searching, there is a
small problem with doing this: Overloading one or two processors in a core could
cause the core to overheat thus destroying your CPU.
One poster suggested you lower the power usage below 100% which is the
default for desktop systems, to below 80%, this would limit the power usage of
the cores and that would reduce the heat build up.
Controlling the power usage of the CPU is one way to limit heat build up,
this however comes with a degrading of performance on slower, lower number of
cores per processor, your choice...
For my older systems with XP, Server 2003, and Windows 7 (all 32 bit) the old
program Set Affinity II is a good
alternative to doing the shortcut process. Note: The Set Affinity II program
will work on Windows 7 however it will not see all programs...
|