Home
Saturday, October 25, 2014
12:28:45 AM
Users online: 0   You are here >> Home > Windows OS

Forums | Windows OS Forums search
Forum FAQ
   
  1  
Permanently assigning CPU affinity
iamthemaxx 
13/1/08 6:19:15 PM
Mod
SuperHero

Immortal


I've been looking for something to help me out with this, cause it sucks doing it every time I have to restart all my apps and do it via Task Manager - and my Q6600 wants to work hard!
You'd think you could at least set it to remember the settings in TM, but nooooo....

I haven't tried all of these, so feel free to try one and let us know how they go.




GUI Applications

THG Task Assignment Manager - http://www.tomshardware.com/2004/05/28/getting_more_bang_out_of_your_dual_processing_buck/index.h

CPU-Control - http://www.softpedia.com/get/Tweak/CPU-Tweak/CPU-Control.shtml

Get and Set CPU Affinity - http://www.geocities.com/edgemeal_software/SetAffinity/index.htm

SMPSeesaw - http://www.mlin.net/SMPSeesaw.shtml

WinLauncherXP - http://www.majorgeeks.com/download870.html


Command line based

RunFirst - http://www.activeplus.com/us/freeware/runfirst/

ImageCFG.exe - http://www.robpol86.com/pages/imagecfg.php

Using cmd.exe and /affinity - http://www.howtogeek.com/howto/windows-vista/start-an-application-assigned-to-a-specific-cpu-in-w

VBS (I think) - http://www.ehow.com/how_2056395_set-windows-vista-processor-affinity.html
I don't understand how this works (yet)....






Got something?
Post away and I will add it.



EDIT1 - added a few more apps. Separated GUI and cmd line.


Edited by iamthemaxx: 13/1/2008 06:28:22 PM

-----

iamthemaxx 
13/1/08 7:02:14 PM
Mod
SuperHero

Immortal


After a bit of a play around.


WinLauncher does a few other things aside from affinity, sets translucency, windows size, priority, additional parameters (eg debug).

TaskAssign is good but basic, no options to autostart, doesn't minimise to systray at all, just sits there.

CPU Control sets it on the fly, can autostart, auto assign. Doesn't seem to remember what I set and save in a profile slot though.

Set Affinity lists all processes and lets you assign from there, can save favourites, autostart, autoset affinity. Seems to be the pick so far.


SMPSeesaw only does dual procs!!

-----

iamthemaxx 
15/1/08 6:20:06 PM
Mod
SuperHero

Immortal


I've been using Set Affinity for a few days now, most recommended.
Auto sets your saved affinity favourites on start, auto starts on login.

Super cool.

-----

F117_Nighthawk 
15/1/08 11:49:08 PM
Overlord

thanks a lot of those may become useful, a lot faster then just using 1 of my cpu cores on load.

which one works best on XP to run at startup?


Edited by F117_Nighthawk: 15/1/2008 11:56:12 PM

-----

Genisis X 
16/1/08 12:21:17 AM
Guru

I create custom shortcuts and change the target field to include a set affinity command.

So the target of the Azereus looks like:
 
C:\WINDOWS\system32\cmd.exe /C start /AFFINITY 2 D:\Applications\Azureus\Azureus.exe


-X

-----
Sadly that is what we have turned our children into. They expect the world to genuflect at their feet. All the pandering to mediocrity from the early years, telling them that they are smart and pretty and special. -plebsmacker

iamthemaxx 
16/1/08 9:00:23 AM
Mod
SuperHero

Immortal


Quote by F117_Nighthawk
thanks a lot of those may become useful, a lot faster then just using 1 of my cpu cores on load.

which one works best on XP to run at startup?



My recommendation so far is Set Affinity. It does XP.

I am yet to try these on XP(64), but will do it this weekend if I get a chance. These are all Vista based reviews so far but from what I have seen these all run on Vista/XP.

-----

sirsquidness 
16/1/08 4:55:37 PM
Overlord

Quote by Genisis X
I create custom shortcuts and change the target field to include a set affinity command.

So the target of the Azereus looks like:
 
C:\WINDOWS\system32\cmd.exe /C start /AFFINITY 2 D:\Applications\Azureus\Azureus.exe


-X



You can also use that method to start a program with a certain priority.

eg
start /abovenormal c:\progra~1\vlc\vlc.exe

You don't need to have the C:\WINDOWS\system32\cmd.exe /C in there. Start is a program, so making a shortcut to it or calling it from a batch script or whatnot will work anyway.

-----
The one. The only. SirSquidness.

If I have a witty signature, will it make people love me?

scottath 
10/2/08 12:17:04 PM
Overlord
Which is the best for vista?
Set affinity recommends itself not to run on vista

-----
Q6600 @3.6GHz| Crucial 4-4-4 PC2 6400 Ballistix 2GB 4-4-4-12 @ 1000mhz] | 200GB HDD | 256MB Gainward 7900GS [mem 845, core 595] | GA-P35-DS4 | Corsair HX-620

iamthemaxx 
10/2/08 4:06:13 PM
Mod
SuperHero

Immortal


I've been using Set Affinity on Vista since I first made this thread, it works fine.


Edited by iamthemaxx: 10/2/2008 04:06:27 PM

-----

pLanck 
12/2/08 9:54:23 AM
Learner

Hmm. I've traditionally been against setting the affinity on processes, based on what I've read and heard (even in the last few months). I might give this a try on my Q6600 XP work box and see how it goes.

I guess there's a good case for it on work machines, where the same programmes are open all day (eg Outlook!). I wouldn't rush to set the affinity on my home machine though...

-----
Open Source Software is replication, not innovation.

iamthemaxx 
12/2/08 10:51:05 AM
Mod
SuperHero

Immortal


Quote by pLanck
Hmm. I've traditionally been against setting the affinity on processes, based on what I've read and heard (even in the last few months). I might give this a try on my Q6600 XP work box and see how it goes.

I guess there's a good case for it on work machines, where the same programmes are open all day (eg Outlook!). I wouldn't rush to set the affinity on my home machine though...



Care to elaborate and explain?

-----

scottath 
12/2/08 3:32:49 PM
Overlord
Set affinity only picks up my quad as a dual ,and i downloaded the quad version

-----
Q6600 @3.6GHz| Crucial 4-4-4 PC2 6400 Ballistix 2GB 4-4-4-12 @ 1000mhz] | 200GB HDD | 256MB Gainward 7900GS [mem 845, core 595] | GA-P35-DS4 | Corsair HX-620

pLanck 
13/2/08 3:58:16 PM
Journeyman

Quote by iamthemaxx
Quote by pLanck
Hmm. I've traditionally been against setting the affinity on processes, based on what I've read and heard (even in the last few months). I might give this a try on my Q6600 XP work box and see how it goes.

I guess there's a good case for it on work machines, where the same programmes are open all day (eg Outlook!). I wouldn't rush to set the affinity on my home machine though...



Care to elaborate and explain?


Not really, but rather than leave myself open for unnecessary criticism, I will elaborate and explain my reasoning.

Microsoft have put a lot of good effort into Vista's scheduler, making it much improved over XP. I'm not making a new claim here, Slace has been proclaiming as much for months. A scheduler’s main function is to determine which of the currently running (and paused, in the case of the super fast task switching that occurs in a OS scheduler) are to executed (allocated to a CPU). Here thread priority also plays a part in the determination of what runs when.

When you set affinity to a CPU for a particular programme you're saying something like "Here Outlook.exe, you always use CPU 2 no matter what". Sounds like a not too bad idea if you're running a single threaded application (or predominantly single threaded). The application always uses the same CPU and hopefully rarely has to contend with other processors for running time. If you've got a quad core CPU and are running only 4 single threaded processes at any one time, setting the processor affinity of each sounds like good idea, even to me.

However, if you're application is bound to a CPU and its multi-threaded, where do other threads spawned by the application get executed? On the same CPU. So now your CPU is going to have to interleave these threads on the same CPU, in order to give the appearance of simultaneously executing threads. It's like being back in the single core/cpu days.

The more applications are bound to specific CPU's, the more this problem will occur.

I'm not denying that affinity bound applications enhance performance in some cases, but you need to fully understand the extent of your operating environment (which includes all applications you might run).

My good friend Jeff Atwood says why so much more clearly (although he is talking specifically about thread priorities, his argument is relevant for what we're discussing here ) http://www.codinghorror.com/blog/archives/000671.html
(He's not actually a good friend, but I am a long time subscriber of his blog and listener of his podcasts, and generally he has very good ideas on the IT industry, and software development.)

The reason why I said it might be a good idea for my work computer has to do with the programmes that run all day (like outlook, visual studio etc). I usually run the same set of programmes every day of the week, so I can more "tailor" my system (not that I'm convinced CPU affinity assignment is a good idea in that case either). At home, the programmes I run are considerably more variant. Because of this variance, I don't want to hamstring my cpu by setting cpu affinity.

-I wasn't/I'm not criticising this thread or it's topic. I was just offering my opinion - that I'll give setting processor affinity another try. :)


Edited by pLanck: 13/2/2008 04:04:16 PM

-----
What is the point of being a spelling and grammar nazi, and also seeing having problem with vulgarity and curses?

  1  
Forums | Windows OS