X2 affinity performace gains (a must read)UPDATED!!!

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Mar 19, 2003
18,289
2
71
Originally posted by: letdown427
hey. the 'software' is all done and works fine. I need somewhere to host it really, as most email accounts refuse to either send/receive/both .exe files.unsurprisingly.i've tested it on windows 2000 and windows xp, it works fine, and there's nothing really that can go wrong, so you shouldn't be too wary about 'testing' it. it'd be cool if you could do some tests with it though, as in, benchmark etc to see if it makes a difference.

I can provide hosting if you need it (I've only very quickly skimmed through this thread, but it sounds like something I'd be interested in myself - I have at least two games for which I have to set the affinity to one CPU core or else they have massive timing issues).

I'm not sure how you'd get the file to me if you can't email it (through an IM client maybe?), but I've got a ton of webspace and bandwidth that I'm not using much of.
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
that'd be very awesome of you! lol, errrm, yeah, the issue is getting it to you in the first place? What email account do you have? gmail just plain refuses lol, I have an old hotmail account, I could email you it through that I think, if not, I can email you it from work tomorrow? Thanks for offering to host!
 
Mar 19, 2003
18,289
2
71
Originally posted by: letdown427
that'd be very awesome of you! lol, errrm, yeah, the issue is getting it to you in the first place? What email account do you have? gmail just plain refuses lol, I have an old hotmail account, I could email you it through that I think, if not, I can email you it from work tomorrow? Thanks for offering to host!

It's been ages since I've really transfered any files through email (or since I've used hotmail :p), but I'd imagine one of those should let you send it...how big is the program? Is it just an issue of file types being blocked by gmail?

Edit: I'm using an email account provided by my university, it's the one listed in my profile.
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
yeh file types. And they aren't silly enough to let you just zip it (unlike outlook/hotmail)

the application? lol, well, mine is 60kb, the other components that it uses can be downloaded from elsewhere if necessary, i'll edit this with the links.


These both need to be in the system32 folder

http://www.beyondlogic.org/solutions/processutil/process203.zip

extract that, Process.exe into system 32 folder.

http://www.adsciengineering.com/StartAffinity/

http://www.adsciengineering.com/StartAffinity/StartAffinity_bin_1.3.zip

That into system32 aswell, rename it SA.exe too, as i was lazy in typing code lol :s
 
Mar 19, 2003
18,289
2
71
I wonder if you could get around that by using a less common compression archive format (like 7-zip or something)...or even if you could just rename the file to a totally random extension for transfer and I could rename it back later :p (not sure if they just look at the file name extension, or any internal file headers/structures)
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

mattsmithREMOVE@tamu.edu



:(



I can definately send it to you tomorrow from work, I knkow for a fact it works sending it zipped to a hotmail account from work, as I've sent friends other apps when i was learning how to program, hehe, sent them annoying little things that swapped their mouse buttons over. lol.
 
Mar 19, 2003
18,289
2
71
Originally posted by: letdown427
This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

mattsmithREMOVE@tamu.edu



:(

The 'REMOVE' is automatically inserted into email addresses in the profiles by the forum software as an attempt at an anti-spambot measure...you have to remove the 'REMOVE' to get the real email address ;)
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
24! awww man what a show. but that's OT. hehe. thanks so much. I'll put up some instructions on what is needed to be done, spose i should've included the token readme.txt complete with 1337 titles and lots of random characters that somehow make a picture or something. Ah well.
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
******HERE IT IS*******TEST IT IF YOU WANT******(update 8th Feb at bottom)

Posting of any benchmark findings/results will be greatly appreciated!!!



http://www.softwarepatch.com/windows/vbrun6.html

Theyre the visual basic runtime libraries, as the webpage says, they're needed to run applications that were written in Vb6, which this one was.



http://www.synthdude.com/affinity.zip

Download that. That's my bit of the program. It needs two other little programs to actualy work though.

That's got process.exe in it. The webpage will give you some info/background on it.

http://www.beyondlogic.org/solutions/processutil/process203.zip

And this is StartAffinity.exe

http://www.adsciengineering.com/StartAffinity/StartAffinity_bin_1.3.zip




OK, for it to work, StartAffinity.exe needs to be renamed SA.exe (because I'm lazy).

With that done, put both SA.exe and Process.exe into the System32 folder (again because I'm lazy, the program gets the location of your system32 folder from your registry then uses it in the path for Process.exe and SA.exe)

Now, run Affinity.exe.

Hopefully it's fairly self explanatory, I'll explain how to use it here anyway.

Clicking Run (or Alt+R) will assign all your running processes to CPU 1. Undo (Alt+U) assigns all your running processes to CPU 1 and 2, and Windows takes over as normal. Exit (Alt+E) does exactly what it says.

Now, the long text box is for the full path of the game you want to run on CPU 2.

For example F:\Splinter Cell\Chaos Theory\system

Then the smaller box is for the .exe name.

For example splintercell3.exe


They're split up like that because, yep you guessed it, I'm lazy. Basically, some files need to be started in their folder, (on their shortcuts properties, 'Start In' will have their containing folder in) so the application path is used for the ChDir and ChDrive functions in VB. At the time it was easier to just use that as a seperate string to manipulate than to make it trim the last bit off.

Clicking 'CPU 2 it' will run the program on CPU2, and then exit affinity.exe.

If you have any requests etc, post/PM and I'll try and add to the program. Also, if you want your games to automatically launch on cpu 2, then there's a way you can do that too, and I can explain it if yanyone wants, which one person did, so here it is:


******HOW TO AUTO START ANYTHING ON CPU2******

So, like me, you're lazy, and don't want to have to type in the path/.exe of the game you want to play. Well, that's fair enough, so here's all you have to do.

Say you have a shortcut to a game's .exe. For simplicities sake, i'm going to pretend notepad is a game.

Create a shortcut to notepad.exe on your desktop. Right click on it, and go to properties. At the top, you'll notice it says target?

And more often than not, it'll be C:\WINDOWS\SYSTEM32\notepad.exe.
If you have windows 2000 and installed windows on a dif partition, say, E, then it'll be E:\WINNT\SYSTEM32\notepad.exe, but you get the idea.

So, you just need to put SA at the start, and a 1 at the end. i.e

(The spaces are important)

SA C:\WINDOWS\SYSTEM32\notepad.exe 1

Windows will then do the rest for you, i.e make it

C:\WINDOWS\SYSTEM32\SA.exe C:\WINDOWS\SYSTEM32\notepad.exe 1

(Well, XP does, 2k probably does, but I thought I'd put that there just incase it didn't.)

If you want something to start on CPU 1, put a 0, not a 1. If you want it on both, put

...\notepad.exe 0 1

(The spaces are important)

Annnnd you're done. Now, when you click on that shortcut, it'll launch notepad, on CPU2.


****8th Feb Update*****

I forgot to mention the command line stuff.

Basically, if you want it to run on startup, you can add it to the startup folder, or make the necessary registry entry (if this is to much work, I can add a button for it into the app.)

So, I'll presume you've bunged it in the startup folder. Right click, go to properties, where it says target, after affinity.exe, put " auto" (without the "", the space is necessary)

Then it'll run automatically and assign the processes to CPU0, (it wont load the form, itll just do it and exit)

If you put " auto10" for example, it will wait ten seconds after startup before running (just incase some long startups mean it misses processes if it runs straight away)

There ends the command line stuff for the mo. Any requests, PM me/post for them.



N.B

Chaos Theory uses a disc checking method that uses the System process(and possibly 2 others, either way, net effect is the same). If you try to launch CT on cpu2 having set the affinities to cpu 1, you'll get BSOD.

0x00000003 INVALID_AFFINITY_SET

or some such. I've solved this in my program, so if any other games give you that BSOD, then I'm afraid you'll just have to launch them with my program if you want them on CPU 2 by themselves. If all the other processes are on both cores and you just want to run a game on a single core regardless of other processes, then you can use the shortcut method fine, it's only when System.exe is on a dif CPU that problems arise. The other culprits were CSRSS.exe, and explorer.exe, they were all involved in launching CT, but whether they would cause the BSOD or not i didn't bother checking, I just fixed it for all of the processes involved in launching it, just in case.


I think that's everything. If you want anything changed, PM/post. Even if you just want different colours or something lol, although I'll probably get bored catering for all those kinda demands!
 

JediNight

Member
Dec 13, 2000
32
0
0
Is it worth using this on Win2K3 as well? For the speed of setting all the affinities at once, rather than 1 at a time.

(See if it gives any performance gains for World of Warcraft)
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
You tell us lol, try it out and see if it makes a difference!

If anyone has any problems with it, I'll try and fix them ASAP, just tell me how to recreate it and I can probably figure out what's wrong. There shouldn't be much room for errors though hopefully, it's a fairly simple program.

JediNight, 13 posts in 5years, and one of them was here! I feel honoured!



EDIT:
I've just sent synthdude the friendlier version of affinity, he'll probably upload it later on, it just has some brief instructions on the form, and nice colors lol. Oh and some credits if u expand the window down.
 
Mar 19, 2003
18,289
2
71
Originally posted by: letdown427

EDIT:
I've just sent synthdude the friendlier version of affinity, he'll probably upload it later on, it just has some brief instructions on the form, and nice colors lol. Oh and some credits if u expand the window down.

I just got the email (just woke up for early morning class :p) and uploaded the newer version to my webserver - the URL is the same as listed above.
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
Anyone managed to try it out yet? get any results? i'm looking to heist a 9800pro from work tomorrow, so will probably be in good benchmarking mood tomorrow. :)
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
BUMP

Have got the 9800pro in bubble wrap in my car, will probably do some testing tonight.

Unsurprisingly, anything that is SMP aware/enabled will be drastically limited by using the affinity set. For example, PC Mark 04, without setting anything, I got 6331 marks (all things stock) Setting the affinity for the app to core 2 and all else on core 1, I got like 4500 or something, I think. Either way, it was about 2k less.

I suppose this app could also be useful if, as happens on some processors, one core clocks much higher than the other? Therefore the good one could be used for gaming/intensive single core applications, whilst the other core gets assigned the less intensive processes. Whether that would cause stability issues I don't know. Just a thought.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: Viditor
Good info...thanks, mate!
MS has made some cryptic remarks in the past as to Vista being more geared towards multicore chips, and I've had a suspicion that this was the reason. Please, when we get a more stable and usable version, if you are able to bench your results would be GREATLY appreciated!

Cheers!

There are some things right now that will only run on cpu0 such as networking threads. Longhorn/Vista will correct this.
 

ProviaFan

Lifer
Mar 17, 2001
14,993
1
0
Originally posted by: Smilin
There are some things right now that will only run on cpu0 such as networking threads. Longhorn/Vista will correct this.
Do you have any info on what other sorts of things Vista might be having optimized for multicore? I get PO every time I insert a CD or DVD and the autorun freezes everything related to explorer.exe for what seems like an eternity; any chance of having that fixed in Vista?
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
it works well lol. If you set it to run on startup (put it in the sartup folder. If you can't be arsed, I can make a button on the app that'll add it to the registry run on startup bit.) If you also add a command line parameter of auto then it'll assign all the processes to cpu1.if you put saaaay auto10 it'll wait ten seconds at startup, then assign all the proceses to cpu1. I'l probably put this in that top post aswell.

on aquamark 3, it makes a fairly consistent yet minimal 30-50 point improvement in CPU score. altho, with cpu scor ebeing over 10k, that's pretty irrelevant. was doing more gfx benching tonight, sorry, managed to ge tmy 9800 (turns out non pro :( ) up to 450core 380 mem, which was nice. hehe. equated to 8k more on aquamark 3.
 

letdown427

Golden Member
Jan 3, 2006
1,594
1
0
Anyone got any results yet?

Anyone actually even used it!?
If you have, is there anything you want me to add to it?

bümp
 

uhaulball

Member
Dec 9, 2005
127
0
0
did anyone try this yet? it seems very simple. it is basically a quick and easy way to make everything run on cpu 0 with a click of a button. am i right, letdown?