Is there a way to force a program to utilize a specific CPU core?

dank69

Lifer
Oct 6, 2009
36,903
32,040
136
I'm working on a dual core workstation and I want to run two cpu intensive programs at the same time. If I run one of the programs it pegs my cpu at 50%. If I run the other one, same thing. But if I run both programs at the same time, my cpu doesn't ever peg at 100%, it just hovers at around 60%. Any way to force them to use 100% of my cpu? :confused:
 

lxskllr

No Lifer
Nov 30, 2004
59,066
9,468
126
You can play around with TaskAssign...

http://ubuntuone.com/6c511QAPESZbGiPo7pSCN2

This is a copy off my machine. I haven't used it in years, but it worked for my purposes. UT2k4 would use 100% of both cores, leaving no resources for system tasks, so I'd get stuttering in game. I could limit it to one core, and everything would work well. It was made by Toms Hardware, and is a little clunky, but it worked on Vista. Dunno about more recent Windows versions. There may be something better out there, but I haven't had a use, so I haven't looked.
 

lxskllr

No Lifer
Nov 30, 2004
59,066
9,468
126
Why can't setting affinity work?

Can't remember the details, but in my case, the built in tools wouldn't work. It took awhile to find TaskAssign, and AFAIK, there were no other tools available close to Vista's release.
 

dank69

Lifer
Oct 6, 2009
36,903
32,040
136
You can play around with TaskAssign...

http://ubuntuone.com/6c511QAPESZbGiPo7pSCN2

This is a copy off my machine. I haven't used it in years, but it worked for my purposes. UT2k4 would use 100% of both cores, leaving no resources for system tasks, so I'd get stuttering in game. I could limit it to one core, and everything would work well. It was made by Toms Hardware, and is a little clunky, but it worked on Vista. Dunno about more recent Windows versions. There may be something better out there, but I haven't had a use, so I haven't looked.
Thanks! I'll give it a try.
 

lamedude

Golden Member
Jan 14, 2011
1,214
19
81
start /affinity 1 (sets to CPU 0) or 2 (CPU 1) foo.exe
Put that in a batch file and open the program with it.