Your Guide to Broadband SG Chat SG Security Scan  

Go Back   SpeedGuide.net Broadband Community > General Discussions > Software Forum

Reply
 
Thread Tools Display Modes
Old 11-02-05, 06:15 PM   #1
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
HOW TO: Process/File Affinity, Imagecfg Control

With HyperThreading and Dual Core CPUs being common in all kinds of systems there may be alot of people interested in controlling which processes use which CPU. This would work for Dual CPU systems to.

The program to use for this is Imagecfg.exe. You can google it to find a download, or get it off of a Windows 2000 or Windows XP Server Resource Kit.


Imagecfg.exe will work with Windows XP(32 bit and 64 bit), Windows 2000, Windows 2003, and hopefully Windows Vista. It is a permanent change to the file, so make a backup before testing.


Imagecfg.exe has a bunch of uses, use the "/?" switch to see all of your choices.


To set a process's affinity use "imagecfg -a 0xn [File Path] [File Name]

Replace n with the CPU you want the process to use.

1 = CPU0
2 = CPU1
4 = CPU2
8 = CPU3

So if you wanted to set C:\Test\Dummy.exe to use the second CPU(CPU1) ir would look like this:

imagecfg -a 0x2 C:\Test\Dummy.exe

For dual core or dual CPU users both CPUs will perform equally, but with HyperThreading enabled systems the first CPU (CPU0) is faster, because the 2nd CPU is just a virtual CPU recycling unused cycles from the first CPU.

By moving processes around it can allow you maximize the performance of CPU intensive programs and games by assigning all necessary processes to 1 CPU, freeing the other CPU for the intensive application.

I've just started messing around with this so I don't have any benchmarks or proof that this does anything, theoretically it should help, most likely in a very small ammount though.


Flaws:
Imagecfg does not seem to recognize folders with spaces in it like "C:\Program Files". To get by this copy the Imagecfg.exe file to that directory and exclude the directory /path.


I'll update this with more information as I get it. Mark and Scott on here, Robpol86.com, and PlanetAMD64 Helped me get all this info.
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"

Last edited by YARDofSTUF; 09-02-07 at 12:46 PM.
YARDofSTUF is offline   Reply With Quote
Old 11-02-05, 07:05 PM   #2
Scott
SG Enthusiast
 
Join Date: Feb 2002
Posts: 3,852
Scott has disabled reputation
Send a message via AIM to Scott Send a message via MSN to Scott Send a message via Yahoo to Scott
Well, not all of it.
Scott is offline   Reply With Quote
Old 11-02-05, 07:07 PM   #3
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
Quote:
Originally Posted by Scott
Well, not all of it.

My bad, I left you out!

I'm not even sure how to benchmark this effectively.
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"
YARDofSTUF is offline   Reply With Quote
Old 11-29-05, 08:20 PM   #4
Mark
resident plumber
 
Mark's Avatar
 
Join Date: Apr 2001
Location: Clearwater, FL.
Posts: 12,094
Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!
are you still using this YoS ?

might try it myself i guess.
Mark is offline   Reply With Quote
Old 11-30-05, 08:17 AM   #5
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
Quote:
Originally Posted by Mark
are you still using this YoS ?

might try it myself i guess.

Yup, use it for folding, run the games off the 2nd core, split EAC and LAME.

Works out good.
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"
YARDofSTUF is offline   Reply With Quote
Old 12-11-05, 05:34 AM   #6
Mark
resident plumber
 
Mark's Avatar
 
Join Date: Apr 2001
Location: Clearwater, FL.
Posts: 12,094
Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!
*bump*

just wanted to thank ya YoS, i was having to reset the affinity on each new
work unit, just tried setting this up with F@H and it works just fine.

Mark is offline   Reply With Quote
Old 12-11-05, 06:24 AM   #7
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
Quote:
Originally Posted by Mark
*bump*

just wanted to thank ya YoS, i was having to reset the affinity on each new
work unit, just tried setting this up with F@H and it works just fine.


Cool, glad it works for ya too. Do remember that each new core you download will start off trying to use both.
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"
YARDofSTUF is offline   Reply With Quote
Old 12-11-05, 06:53 AM   #8
Mark
resident plumber
 
Mark's Avatar
 
Join Date: Apr 2001
Location: Clearwater, FL.
Posts: 12,094
Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!
Quote:
Originally Posted by YARDofSTUF
Cool, glad it works for ya too. Do remember that each new core you download will start off trying to use both.
so does that mean i have to start it and then restart it to have the affinity set with that comand ?
Mark is offline   Reply With Quote
Old 12-11-05, 10:41 AM   #9
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
Quote:
Originally Posted by Mark
so does that mean i have to start it and then restart it to have the affinity set with that comand ?

I usually stop F@H, then run imagecfg then reload F@H
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"
YARDofSTUF is offline   Reply With Quote
Old 12-12-05, 05:43 AM   #10
Mark
resident plumber
 
Mark's Avatar
 
Join Date: Apr 2001
Location: Clearwater, FL.
Posts: 12,094
Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!
mine seems to be saving the affinity setting on new work units according to the task manager.
Mark is offline   Reply With Quote
Old 12-12-05, 06:10 AM   #11
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
Quote:
Originally Posted by Mark
mine seems to be saving the affinity setting on new work units according to the task manager.

New units yes, new cores are what I mean. the other *.exe files.
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"
YARDofSTUF is offline   Reply With Quote
Old 12-12-05, 06:27 AM   #12
Mark
resident plumber
 
Mark's Avatar
 
Join Date: Apr 2001
Location: Clearwater, FL.
Posts: 12,094
Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!
ah i see, i set the imagecfg to the console.exe, did you set yours to the individual cores ?

i wonder if i did this right

i followed the instructions here and used "imagecfg -a 0x1 c:\path\to\file.exe", where file.exe is the console.exe
Mark is offline   Reply With Quote
Old 12-12-05, 07:06 AM   #13
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
Quote:
Originally Posted by Mark
ah i see, i set the imagecfg to the console.exe, did you set yours to the individual cores ?

i wonder if i did this right

i followed the instructions here and used "imagecfg -a 0x1 c:\path\to\file.exe", where file.exe is the console.exe
I did it to each *.exe file.
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"
YARDofSTUF is offline   Reply With Quote
Old 12-12-05, 04:54 PM   #14
Mark
resident plumber
 
Mark's Avatar
 
Join Date: Apr 2001
Location: Clearwater, FL.
Posts: 12,094
Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!
Quote:
Originally Posted by YARDofSTUF
I did it to each *.exe file.
console or core exe ?
Mark is offline   Reply With Quote
Old 12-12-05, 05:01 PM   #15
YARDofSTUF
Second Most EVIL
 
YARDofSTUF's Avatar
 
Join Date: Nov 2000
Location: USA
Posts: 67,511
YARDofSTUF has disabled reputation
Send a message via ICQ to YARDofSTUF
Quote:
Originally Posted by Mark
console or core exe ?

all
__________________

Chronicles 1 1:04:

"Teh baybeez ov Noah (but onlyz da boyz, dey wuz missawjinist): Shem, Ham (om nom nom!), & Japheth. Dey wuz teh Japhethites lulz"
YARDofSTUF is offline   Reply With Quote
Old 12-12-05, 05:34 PM   #16
Mark
resident plumber
 
Mark's Avatar
 
Join Date: Apr 2001
Location: Clearwater, FL.
Posts: 12,094
Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!Mark [5000+] is a trusted member!
i just set the console affinity and it seems to work.
Mark is offline   Reply With Quote
Old 05-03-07, 03:06 PM   #17
graysky
Member
 
Join Date: May 2007
Posts: 56
graysky [100+] will become famous soon enoughgraysky [100+] will become famous soon enough
Great guide, thanks. How can I undo the settings I added? In other words I want to enable the app on all the cores (I have a q6600)?

Thanks.
graysky is offline   Reply With Quote
Old 07-15-07, 06:14 AM   #18
graysky
Member
 
Join Date: May 2007
Posts: 56
graysky [100+] will become famous soon enoughgraysky [100+] will become famous soon enough
Quote:
Originally Posted by graysky View Post
Great guide, thanks. How can I undo the settings I added? In other words I want to enable the app on all the cores (I have a q6600)?
The answer is to backup the exe first since this utility literally modifies the exe you point it to use. It's only useful if you literally want the app to stay running on one and only one core.
graysky is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No delays in birth control prescriptions BaLa General Discussion Board 4 04-03-05 01:46 AM
Microsoft - Why?! Joel General Discussion Board 7 01-13-04 03:27 PM
Have you ever dealt with a control freak? Debbie General Discussion Board 41 08-18-03 07:38 PM
Anyone familiar with Microsoft access? CoolJ Software Forum 6 04-16-03 11:33 PM
Is everybody on drugs or w33d tonight? Brent General Discussion Board 7 04-14-03 10:41 PM


All times are GMT -5. The time now is 09:03 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.