Page 1 of 1

Automatically defining Affinity for WinXP processes?

Posted: Thu Jan 01, 2004 2:26 pm
by Max_T
Is it possible? I got a P4 with HT and defauklt affinity is to use both CPUs for all processes. I need a specific process with specific name to set affinity to only CPU 0. I don't feel like doing it manually every time the process starts. Is there a way to make affinity to <u> automatically</u> default to only 1 cpu for a <u> specific process</u> only?

Posted: Thu Jan 01, 2004 4:50 pm
by Warlock
on my W2kAS if i right click on the exe i can set it in there

Posted: Thu Jan 01, 2004 4:55 pm
by CDN_Merlin
If you've got A P4, then you only have 1 CPU right? Which would defy what you are trying to do here no?

Posted: Thu Jan 01, 2004 6:32 pm
by Max_T
Warlock: hmm, i don't see this under WinXP. In WinXP this is done through the task manager. Good suggestion, but it's different in WinXP.

Merlin: P4 with HT means P4 with hyperthreading. Hyperthreading means there is one physical but two logical CPUs, and the OS sees two CPUs like in real SMP systems. So no, I am not defying anything Image

Xciter: believe it or not, but trhough my own testing, i found HT to work really well in some situations, I do not want to disable it, it only gets in the way of one single application - Descent3. Thanx to creative *&^^$&^$% drivers, that still don't work with SMP systems. For some odd reason, D3 reboots my PC if HT is enabled. After hours of troubleshooting, i was able to play D3 with HT enabled with the -nosound switch.
Then after some time, i thought of trying to assign affinity to only one logical CPU, instead of two. Today i tried it, and D3 hasn't rebooted my PC. I can keep HT and play D3 with sound, as long as i set the affinity of the process MAIN.EXE to only CPU 0. This takes like 10 seconds to do, I don't mind doing it manually. But i was hoping there was a way to automatically start a specific process (MAIN.EXE) with a given affinity setting (CPU 0, but not CPU 1), so i wouldn't have to change it manually every time i start D3.

This is not a questions of whether I need HT or not, I decided to keep it on. I just need to find out if there is a way to automate all this.

Posted: Thu Jan 01, 2004 6:36 pm
by BUBBALOU
Dual PROCESS (HT) and Dual PROCESSOR (2 CPU's) are totally different worlds. It is nice when you have a program that works with dual(X), like 3dsmax, photoshop......getting a litle boost

Just leave it as is, if you have an issue when a new game will not run out of the box.... then think about disabling HT.

PS go get the new Creative drivers

Posted: Thu Jan 01, 2004 6:45 pm
by Max_T
Guys, you are not reading.

I know the differences between real SMP and HT. ANd i can't leave it as it is, since it reboots my PC when i play D3.

Like i said, all i need to know is if there is a way to automatically set specific affinity for a process with a specific name whenever it starts up. Otherwise i'll be doing it manually every time.

Oh and, i went through all creative driver versions for Audigy2. Problem was present on all of them.

Posted: Thu Jan 01, 2004 9:17 pm
by Max_T
thanx, i'll check it out.

edit: looks like exactly what i was looking for.

Thanx

Posted: Fri Jan 02, 2004 12:15 am
by Admiral LSD
<BLOCKQUOTE><font size="1" face="Arial">quote:</font><HR><font face="Arial" size="3">Originally posted by Max_T:
Warlock: hmm, i don't see this under WinXP. In WinXP this is done through the task manager. Good suggestion, but it's different in WinXP.</font><HR></BLOCKQUOTE>

I think there's a registry key that enables that under at least 2k Pro (though I fail to see how XP would be any different) but I really can't remember for sure.
<font face="Arial" size="3">Thanx to creative *&^^$&^$% drivers</font>
heh, this is one of the reasons why my BSLive is sitting in an anti-static bag (and also one of the reasons I didn't buy another Creative card for this PC) waiting for me to either put an axe through it or sell it to some unsuspecting fool, I haven't decided which.

Posted: Fri Jan 02, 2004 6:06 am
by BUBBALOU
I guess that lil program for sysbase is your only option besides disabling HT

according to M$ for XP Pro

Managing processor affinity on multiprocessor systems:

If you want to assign a particular process or program to a single processor to improve its performance at the expense of other processes, in Task Manager, click Set Affinity. This option is available only on multiprocessor systems.

not dualprocess CPU's

Posted: Fri Jan 02, 2004 1:08 pm
by Tetrad
XP sees a P4 with HT as two processors. Just like XP sees my dual xeons with HT as four processors.

Posted: Fri Jan 02, 2004 2:45 pm
by Garfield3d
His program won't implode. People recommend affinity for only one processor in HT systems for Dark Engine games (System Shock 2, Thief) too and those games run perfectly fine when messing with the affinity.

Posted: Fri Jan 02, 2004 4:03 pm
by Grendel
<BLOCKQUOTE><font size="1" face="Arial">quote:</font><HR><font face="Arial" size="3">Originally posted by Max_T:
I know the differences between real SMP and HT. ANd i can't leave it as it is, since it reboots my PC when i play D3.</font><HR></BLOCKQUOTE>

Well, the problem is not D3 -- I'm running it on a P42.8C w/ HT enabled under XPP just fine..

Posted: Fri Jan 02, 2004 6:38 pm
by Max_T
The problem is creative drivers. For me, it only happens when i play d3, no matter what sound i pick (d3d, eax, etc). And also, it reboots when IE plays those clicking sounds when you click on a new link (i had to disable taht sound too).

It's weird and annoying, but there are workarounds, so I don't have to disable HT.

Posted: Fri Jan 02, 2004 6:40 pm
by Max_T
Thanx Xciter, that program worked likea charm.

Posted: Sat Jan 03, 2004 1:41 am
by Vindicator
My god... just get a different sound card already! Image

Posted: Sat Jan 03, 2004 11:17 pm
by Max_T
btw, if any1 needs it, the program and the instructions can be found here:

http://www.robpol86.com/tutorials/imagecfg.php