Page 1 of 1

2 instances of folding on 4 cores

Posted: Wed Feb 15, 2006 4:26 pm
by leor
I noticed with this screenshot that the 2 instances of folding aren't each cleanly taking a core.
<img src="http://www.leor.com/stuff/task-manager.gif">
when i have one instance going on a dual core CPU (like when the other core is downloaidng a new WU) one is running full tilt. This one seems a bit spread out over the 4, and I've notised the usage going as high as 29 in the CPu usage in the proceese tab when is technically should never go above 25.

interesting . . .

Posted: Wed Feb 15, 2006 4:32 pm
by Shintai
Try set CPU affinity to each process. Maybe run 4 instances instead.

You can do this automatic by the commandline aswell using the "start /affinity"

Posted: Wed Feb 15, 2006 4:32 pm
by Buub
Stop worrying about it. It's not a big deal. If the OS needed to keep it on a single core all the time, it would. Keep in mind that those are snapshots every three seconds, and within three seconds the context switching mechanism has run hundreds of times. It's possible that the OS could find a reason every so often to change cores.

If it was split close to 50/50 all the time, then I'd be concerned. As it is, I wouldn't worry about it.

I wouldn't recommend messing with affinity unless there's a really good reason to do so. Setting affinity really is intended for big servers where you want to exclude a large server process from dominating all the CPUs. Even then, it's used very sparingly.

Is this causing some sort of problem?

Posted: Wed Feb 15, 2006 5:41 pm
by mattsteg
Buub wrote:
Stop worrying about it. It's not a big deal. If the OS needed to keep it on a single core all the time, it would. Keep in mind that those are snapshots every three seconds, and within three seconds the context switching mechanism has run hundreds of times.
3 seconds? If that were the case the graphs would update more slowly. I certainly agree with the bulk of your point, but that time interval isn't right. Just pulling up a taskmanager here I see updates maybe every second and a bit, that's significantly different than every 3 seconds.

Posted: Wed Feb 15, 2006 5:46 pm
by Usacomp2k3
mattsteg wrote:
Buub wrote:
Stop worrying about it. It's not a big deal. If the OS needed to keep it on a single core all the time, it would. Keep in mind that those are snapshots every three seconds, and within three seconds the context switching mechanism has run hundreds of times.
3 seconds? If that were the case the graphs would update more slowly. I certainly agree with the bulk of your point, but that time interval isn't right. Just pulling up a taskmanager here I see updates maybe every second and a bit, that's significantly different than every 3 seconds.

It kinda depends on what you have the 'update speed' set to. Normal is supposed to be 1 second, I think (more like 1.8 for me)

Posted: Wed Feb 15, 2006 6:47 pm
by leor
Buub wrote:
Stop worrying about it. It's not a big deal. If the OS needed to keep it on a single core all the time, it would. Keep in mind that those are snapshots every three seconds, and within three seconds the context switching mechanism has run hundreds of times. It's possible that the OS could find a reason every so often to change cores.

i'm nto worried about it, i just thought it was interesting, i never saw F@H do anything like that before

Posted: Wed Feb 15, 2006 6:51 pm
by Buub
Usacomp2k3 wrote:
mattsteg wrote:
Buub wrote:
Stop worrying about it. It's not a big deal. If the OS needed to keep it on a single core all the time, it would. Keep in mind that those are snapshots every three seconds, and within three seconds the context switching mechanism has run hundreds of times.
3 seconds? If that were the case the graphs would update more slowly. I certainly agree with the bulk of your point, but that time interval isn't right. Just pulling up a taskmanager here I see updates maybe every second and a bit, that's significantly different than every 3 seconds.

It kinda depends on what you have the 'update speed' set to. Normal is supposed to be 1 second, I think (more like 1.8 for me)


LOL I brain farted. 3 seconds is what I set "top" to update on my FreeBSD box. Yes, TaskManager default is 1.5~2 seconds.

Posted: Thu Feb 16, 2006 11:08 am
by Logan[TeamX]
You can use the ImageCFG utility to force affinity for each distinct executable. I've done this for both instances on my Opteron 170... it's smooth as glass.

http://forums.amd.com/index.php?showtopic=64774

Posted: Thu Feb 16, 2006 1:40 pm
by Buub
Logan[TeamX] wrote:
You can use the ImageCFG utility to force affinity for each distinct executable. I've done this for both instances on my Opteron 170... it's smooth as glass.

http://forums.amd.com/index.php?showtopic=64774


Yes, but the question is begged: what's the point? Is it any more smooth than if you just left the affinity alone? I'll bet you'd get better overall system responsiveness and performance by letting the OS do its job rather than assigning explicit affinity to a whole bunch of executables.

For example, what if the OS decides it needs to process an interrupt on the processor you have assigned affinity to? You now have both tasks running on one processor and another processor doing nothing (in the case where you have less than two full-running processes).

Granted, this probably isn't a big issue if you have two executables. But the OS is going to do the same thing you're already taking extra effort to do: run each process on a single processor.

Posted: Thu Feb 16, 2006 3:10 pm
by Logan[TeamX]
Have you actually SEEN the difference between not forcing affinity and after enforcing affinity?

I'm not talking about the half-assed "set affinity" on running processes with Task Manager, I'm talking about F@H's Machine ID identifier and after a properly-set imagecfg pass.

It's night and day. The Machine ID lets two or more processes play nicely together, but that's it. It doesn't force all the work of each instance to be completed on one processor / core.

I also like it for the explicit fact that I can force affinity for a game, shut down one service, and let one service run with the knowledge that aside from minor memory access contention, it's slick.

Actually, I tend to leave both services running and let process priority determine what happens. EVE, CS:S, NFS:MW and my favourite addiction Silent Hunter III all run flawlessly. And, I might add, much better than with everything the way it was before setting affinity.

Posted: Thu Feb 16, 2006 3:34 pm
by mattsteg
Logan[TeamX] wrote:
I'm not talking about the half-assed "set affinity" on running processes with Task Manager, I'm talking about F@H's Machine ID identifier and after a properly-set imagecfg pass.
What's half-assed about "set affinity", other than it being repetitive to implement on a regular basis?

Buub: for certain situations setting affinity has a very noticable positive effect. Yes, most of the time it's useless, but sometimes it really carries the day. A quick example from my experience would be running a BF1942 dedicated server and joining it from the same machine back when the game was released. Running a nondedicated server and playing == choppy and unplayable. Running a dedicated server and a separate process to join it == choppy any unplayable. Running both processes and setting their respective affinities to different processes == smooth and very playable. If you have a couple of compute-intensive processes that you don't want stepping on each other's toes, setting affinity can yield tremendous gains.

Posted: Thu Feb 16, 2006 3:44 pm
by Logan[TeamX]
It's repetitive because each time you launch an affinity-sensitive or multi-core-sensitive app, you have to go and set the affinity!

After 3-4 times, it gets a tad annyoing.

Posted: Thu Feb 16, 2006 5:35 pm
by KingFish
Can a script/bat file cover that? I've never messed around with affinity so don't slam me too hard if I'm not even close to the ballpark on this one....

Posted: Thu Feb 16, 2006 8:10 pm
by leor
well it seems like i'm getting spillover into a 3rd core if the process spikes up to 29 every now and then.

isn't that more valuable than running at a solid 25?

Posted: Thu Feb 16, 2006 8:33 pm
by computron9000
there are freeware infinity setting programs for Windows. try ROPE.

Posted: Thu Feb 16, 2006 9:23 pm
by Logan[TeamX]
The link I posted to in my first reply was the how-to I wrote for the AMD Forums. The ImageCFG.exe tool is actually a NT4 CLI tool that was written by MS but never "offiically" acknowledged or supported.

It works like a champ, and between my article and the primary author's website, you can't really mess it up.