Set CPU Affinity prior to app launch?

Status
Not open for further replies.

skyguy

Distinguished
Aug 14, 2006
2,408
0
19,780
For the life of me, I can't remember how to set CPU Affinity for an application BEFORE it launches. Changing it WHILE the app is running is easy but I don't want to always have to crtl-alt-del into Processes to change AFTER I run the app.

I have an app that wants to run on CPU 0 and not CPU 0/1. So I got CPU 0 @ 100% and CPU @ 15% or something. I've put " -cpu 0 -cpu 1" at the end of the target line, but that doesn't work. I can't remember the proper syntax....argh.

What's the proper syntax/methodology to Set Affinity on Target line?

Much thanks.
 

SEALBoy

Distinguished
Aug 17, 2006
1,303
0
19,290
Until now, I didn't know you could set affinity of any program from Task Manager. :oops:

I'd love an answer to this as well. It would be nice to have all processes run on one core and your games on the other without having to manually set the affinity each time.
 

skyguy

Distinguished
Aug 14, 2006
2,408
0
19,780
LMAO. Well now I don't feel like such a noob. I guess if ya gotta ask a question, better make it a good one, eh? ;)

Ya, you can set affinity from Process in Task Manager, but it's WHILE the app is running.

Someone, somewhere, at sometime.....told me how to do it, but I've long since forgotten :oops:
 

Valerarren

Distinguished
May 20, 2006
37
0
18,530
I thought there was an application one had to download which would change the beginning of the executable to make it permanently on one core or the other. It would probably break things if you ever tried to run a patch on the program though (without changing back to the original executable first).
 

The-Darkening

Distinguished
Nov 30, 2006
192
0
18,710
As far as I know, there are no way to preset affinities with Task manager.

I think this is the application to set affinity that you're mentioning.

I'm linking to the official source here:

http://forums.amd.com/lofiversion/index.php/t65211.html

Also a google caché of the same page because AMD forums were under repair at the moment...
http://209.85.165.104/search?q=cache:38oV_l6l73wJ:forums.amd.com/lofiversion/index.php/t65211.html+set+affinity&hl=es&ct=clnk&cd=1&gl=ar

I read in that site that now you don't need to modify the exe to make it work. I sincerely didn't test it so don't complain if that program misteriously wipes out all your pr0n. I can't find mine, thats for certain. (??)

Hope it helps and as usual, sry for my english!
 

1Tanker

Splendid
Apr 28, 2006
4,645
1
22,780
I heard duct tape works with bailing twine and a shot of whiskey for the user.Other than that I have no clue but I did make a tape and twine ball and used it as a trash can ball as i was getting drunk. :D
Was that before or after you bent the pins installing your 3200+? :eek: :oops: :oops: Sorry Vern....i'll can it with the pin jokes, from now on. :wink:
 

SSS_DDK

Distinguished
Jan 28, 2007
136
0
18,680
here's one way to do so...if you're interested you can get the source code (on the left and check how they do it) else just download the binary
http://www.adsciengineering.com/StartAffinity/
 

Ford_Prefect

Distinguished
Jun 12, 2003
49
1
18,535
There's a program called Launch & Set (although the link seems to be down at the moment) which allows you to set the affinity of a program to either or both cores before you launch it. It's only a small program (about 60k) so drop me a PM with your email if you want a copy. If I get too many requests I'll upload it and send you a link instead.
 

koolaidkitten

Distinguished
Feb 22, 2006
110
0
18,680
I always used "Firedaemon" myself for this specific purpose, well at least for starting my game server on specific cores. Never tried it with any regular applications.

http://www.firedaemon.com/
 

skyguy

Distinguished
Aug 14, 2006
2,408
0
19,780
Wow, thanks for the responses!

Ford, I've sent you a PM so you can email me that prog to try out.....it seems simple enough.

I'll try that first and see how it goes. Maybe look into SSS's suggestions.


Much apppreciated, great help.
8)
 

djgandy

Distinguished
Jul 14, 2006
661
0
18,980
hmmm...I'm kinda tempted to write a little tray app that lets you add processes to a list and auto changes their affinity and priority. Really should be doing my own work tho!

That imagecfg link is interesting. Not sure how it works, I can't remmeber if there is a var for affinity in the PE headers or not.
 
G

Guest

Guest
Yea. The THG Task Assignment Program is very usefull. I have used it often recently, as long as TaskAssign.exe is running in memory (Assuming you have already Set Processor Affinity) it will run the Specified Application(s) in it's App List, using the processor you have specified.
 
I would ordinarily remind people that downloading and running files linked by new registrants is quite a bit less than wise. But here at Tom's we are smarter than that...




BLAAAAAAAAAAHAHAHHAHAHAHHAHHAHAHAHAHAAAH!!!!!!




Oh mah... I kill myself sometimes... :D
 
G

Guest

Guest
If you dont't want people to help in this forum, just say it; and in order to prevent other users, first check if you are right or not with that kind of affirmations. I'm offering for free a software of my property, and I think I deserve a little of respect. So, if you don't trust, the answer is easy: don't click.
One more thing, I just registered to post this link to give people a solution that I made for myself, and I wanted to share it. Perhaps, Scotteq, you're not as smart as you pretend to. No more to say.
 
Status
Not open for further replies.

TRENDING THREADS