Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: An easier way to set processor affinity?  (Read 2366 times)

Magnnus

  • Bay Watcher
    • View Profile
An easier way to set processor affinity?
« on: September 20, 2008, 05:03:16 pm »

As many of us here know, DF can only use one core and uses as much of that core as it can. This means that the less other processes are running on that core the better DF will run. My gripe is that I have at least 50 processes running and to manually set the affinity for each process is a grueling task that I have to go through whenever I decide to play DF.

So my question is: does anyone know of a program that can easily turn off one core for all processes? That is to say that I want a program that will be able to set all programs to not use core 3 so that I can then make DF only use core 3.

I thought such a program would be easy to find but after literally at least 4 hours of searching over many days I have yet to find such a thing. As a matter of fact I doubt such a simple program exists at all.

Edit: the program would have to work on Vista.
« Last Edit: September 20, 2008, 05:31:25 pm by Magnnus »
Logged

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: An easier way to set processor affinity?
« Reply #1 on: September 20, 2008, 05:13:42 pm »

Hmmmmmm...perhaps the THG Task Assignment Manager is what you are looking for. Give it a try.  :)
Logged

Magnnus

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #2 on: September 20, 2008, 05:17:24 pm »

Hmmmmmm...perhaps the THG Task Assignment Manager is what you are looking for. Give it a try.  :)

Not quite, this would require me to set each affinity individually just like the task manager.

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: An easier way to set processor affinity?
« Reply #3 on: September 20, 2008, 05:22:12 pm »

Hmmmmmm...perhaps the THG Task Assignment Manager is what you are looking for. Give it a try.  :)

Not quite, this would require me to set each affinity individually just like the task manager.

Hm, what about runfirst?
Link:
http://www.activeplus.com/us/freeware/runfirst/
Logged

Magnnus

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #4 on: September 20, 2008, 05:28:57 pm »

Hmmmmmm...perhaps the THG Task Assignment Manager is what you are looking for. Give it a try.  :)

Not quite, this would require me to set each affinity individually just like the task manager.

Hm, what about runfirst?
Link:
http://www.activeplus.com/us/freeware/runfirst/

This is even farther from what I'm looking for. It only starts a process on a single core with a command line input, which is of no use to me.

To clarify in case I wasn't clear enough: I'm looking for a program that can set the affinity (what cores are used) for many programs (preferably all) at the same time. For example I want to either have a button that says "set all programs to use core 0,1, and 2, but not 3" or a program where I can highlight as many programs as I want from a list, right click, and turn off core 3.

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: An easier way to set processor affinity?
« Reply #5 on: September 20, 2008, 05:34:54 pm »

Hmmmmmm...perhaps the THG Task Assignment Manager is what you are looking for. Give it a try.  :)

Not quite, this would require me to set each affinity individually just like the task manager.

Hm, what about runfirst?
Link:
http://www.activeplus.com/us/freeware/runfirst/

This is even farther from what I'm looking for. It only starts a process on a single core with a command line input, which is of no use to me.

To clarify in case I wasn't clear enough: I'm looking for a program that can set the affinity (what cores are used) for many programs (preferably all) at the same time. For example I want to either have a button that says "set all programs to use core 0,1, and 2, but not 3" or a program where I can highlight as many programs as I want from a list, right click, and turn off core 3.

Ah gotcha...hmm I will ask around, I know some software + hardware freaks also.  ;)
Logged

sjmarshy

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #6 on: September 20, 2008, 05:37:43 pm »

This thread is relevent to my interests, want to use my new quad core to its maximum.
Logged

Xgamer4

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #7 on: September 20, 2008, 05:57:18 pm »

I can't help but think people are overestimating just how much a speed boost is gained from giving DF its own core.
Logged
insert something mind-blowing/witty here*

sjmarshy

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #8 on: September 20, 2008, 06:03:46 pm »

Maybe, but I have enough cores to give it a go and see how it does. Granted, its running pretty fast as it is. but it'd be fun :).
Logged

Magnnus

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #9 on: September 20, 2008, 06:40:45 pm »

I can't help but think people are overestimating just how much a speed boost is gained from giving DF its own core.

Ive done it manually before and I get a boost from an average of 15 fps to an average of 20 fps.

This is over 4 cores, which means that the fps without using processor affinity would be much lower (likely about 10) if I had 2 cores.
« Last Edit: September 20, 2008, 06:42:37 pm by Magnnus »
Logged

sjmarshy

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #10 on: September 20, 2008, 06:55:46 pm »

I can't help but think people are overestimating just how much a speed boost is gained from giving DF its own core.

Ive done it manually before and I get a boost from an average of 15 fps to an average of 20 fps.

This is over 4 cores, which means that the fps without using processor affinity would be much lower (likely about 10) if I had 2 cores.

out of curiosity, what processor do you have?
Logged

Worldwaker

  • Bay Watcher
  • Kitty!
    • View Profile
Re: An easier way to set processor affinity?
« Reply #11 on: September 20, 2008, 06:59:46 pm »

This, is damn near what you'd want. It saves profiles for your stuff too. Also, your google-fu is weak. Found that in a mighty two clicks.

Original article: Long URL
« Last Edit: September 20, 2008, 07:03:15 pm by Worldwaker »
Logged

Magnnus

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #12 on: September 20, 2008, 07:12:08 pm »

This, is damn near what you'd want. It saves profiles for your stuff too. Also, your google-fu is weak. Found that in a mighty two clicks.

Original article: Long URL

Thank you very much, this seems to be what I'm looking for. Ill try it out and get back to you.

Edit: Just tested this and it works perfectly. The google is strong with you.

Quote
out of curiosity, what processor do you have?

I don't know off hand. This computer is my parents, not mine.
« Last Edit: September 20, 2008, 07:42:19 pm by Magnnus »
Logged

Soralin

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #13 on: September 20, 2008, 07:21:26 pm »

As a bit of an alternate method, you could try playing around with the [PRIORITY:NORMAL] tag in df's init file, and setting it to [PRIORITY:HIGH] or [PRIORITY:REALTIME] instead.  Those should result in a similar performance for dwarf fortress, as dwarf fortress would get the priority for that core, and the other processes on that core would basically only get whatever is left over when df has had it's fill.
Logged

Magnnus

  • Bay Watcher
    • View Profile
Re: An easier way to set processor affinity?
« Reply #14 on: September 20, 2008, 07:36:39 pm »

As a bit of an alternate method, you could try playing around with the [PRIORITY:NORMAL] tag in df's init file, and setting it to [PRIORITY:HIGH] or [PRIORITY:REALTIME] instead.  Those should result in a similar performance for dwarf fortress, as dwarf fortress would get the priority for that core, and the other processes on that core would basically only get whatever is left over when df has had it's fill.

Ive tried that and it only causes the game to be extremely jumpy, moving from 1-3 fps to 15-18 fps.
Pages: [1] 2