Issues with current quadcore CPUs..

Having had a chance to play around with my current box for a bit I quickly noticed some unflattering problems when concurrently running programs that consume a lot of CPU time.

For example to stress out all CPU cores and see how the system performs with regards to heat and noise I decided to hop back on the Boinc/SETI bandwagon I abandoned years ago.

As it turned out this PC performs magnificiently. I had around 2500 credit stored in my account from way way back (sum total of YEARS of scanning for aliens) and now after about 3 days I'm up to almost 5000.

Anyway.. The thing is that when SETI's running on all four cores it causes the Vista GUI to sag noticeably in performance. Instead of windows scrolling and moving smoothly there's a visible jerkiness in updates. This also happens in games. Doom3 which runs at 60fps locked pretty much all tthe time becomes jerky in areas with more complex visuals.

It doesn't seem to matter that Boinc is a lowest priority task. I can only assume that this is because Windows and the CPU can't pull back on tasks running on other cores when a higher priority task needs to access memory etc.

So the task priority system is basically defeated by multicore CPUs it would seem.

Is this a fair assessment? Right now I end up snooozing Boinc when I want to play games. It's becoming a little annoying already because I'm used to just having to start a game and have my backgroudn task actually kicked to the background. Not fighting for resources with my foreground task (game)..

I suppose things will improve when we get software that properly spreads out to multiple CPU cores and can therefore push these distributed computing tasks out of the way..

Peace.
 
Depends on how the applications are coded.

It sounds like, to me, that your SETI / Boinc is using the first logical processor (CPU 0, ie your first core) , and then when you start Doom3, it too is using the first logical processor (CPU 0 again) Two things on one processor obviously means slowness for both.

What you seem to be asking for is the ability of the operating system to shift affinity, or the individual application's assigned logical processor. The reality is, an OS really shouldn't do this for multiple reasons. How does your OS know which items it should shift due to load reasons? How does the OS know if an app is even capable of being run on any processor other than the first logical one? How would the OS know if a certain application is capable of running multiple cores simultaenously?

The (should-be) obvious answer to all of those questions is: it doesn't.

So, here's how to fix it:

Start Boinc or Seti, and then start task manager and look at your processes. When you find your Boinc / Seti client, right-click it and one of the options will be "set affinity". By default, the app will have access to both processors, but depending on how it's coded, it likely is only running on the first one. Uncheck all the boxes but CPU 3. Now Boinc/Seti will only run on your fourth core... You can start seperate SETI / Boinc sessions and do the same thing again, this time assigning one session per core -- but leave CPU 0 out.

Now, go start your Doom 3 game. Chances are, with the BOINC / Seti clients going on the other three cores, Doom 3 will happily play along on the first CPU without hiccups.

EDIT
Wanna do this even easier? Vista finally brings the ability to set affinity by the start command. So you can create yourself a simple batch file (depends on how many boinc/seti sessions you want to run simultaneously -- I'd suggest no more than three) by doing this:

From the start -> run box, type:
notepad c:\dothis.cmd

When notepad asks if you wish to create a new file, tell it yes. Then copy-n-paste the following:

Code:
@ECHO OFF
start /affinity 2 "C:\Program Files\Seti\Client.exe"
start /affinity 4 "C:\Program Files\Seti\Client.exe"
start /affinity 8 "C:\Program Files\Seti\Client.exe"
You can now double-click C:\Dothis.cmd and it will start three SETI clients. Obviously you may need to modify the path and executable name...

The first line just turns local echo off for cleanliness.
The second line starts a Seti client on CPU 1 (second logical processor)
The third line starts a Seti client on CPU 2 (third logical processor)
The fourth line starts a Seti client on CPU 3 (fourth logical processor)

The number is actually a hexadecimal notation...
1 = 0001 (only 1st processor is used)
2 = 0010 (only 2nd processor is used)
3 = 0011 (only 1st and 2nd processors used)
4 = 0100 (only 3rd processor used)
5 = 0101 ...
6 = 0110 ...
7 = 0111 ...
8 = 1000 (only 4th procesor used)

Make sense?
 
Last edited by a moderator:
Depends on how the applications are coded.It sounds like, to me, that your SETI / Boinc is using the first logical processor (CPU 0, ie your first core)
No Seti happily runs on all 4 cores like I said. In fact I think it defaults to run on 16 (!) simultaneous cores when you start the client..

and then when you start Doom3, it too is using the first logical processor (CPU 0 again) Two things on one processor obviously means slowness for both.
No Seti's set to run at lowest task priority. So when Doom3 runs on whichever core it ends up on it will suppress Seti from running.

But ONLY on THAT core.

So Seti will continue to run happily on the other 3 cores at lowest priority and accessing memory so there will be 3 lowest priority processes contending presumably on the exact same level as one normal priority process for system resources. Which means Doom'll get strangled.

There doesn't seem to be any hardware in current multicore CPUs to prioritize a task's access to outside system resources according to its OS priority. After all there's just one memory bus which has to be shared between four processors so you'd think the lowest priority process would have less priority than others when accessing memory. But if it's the only process using significant CPU time on that core there's nothing stopping it from hogging bus capacity.

What you seem to be asking for is the ability of the operating system to shift affinity
Nah. That's not what I want.

Besides I prefer not to faff with shit like that..I hate micro-managing stuff. On my PC as well as in gmes. :cool: If I can set something to automatic rather than manual I generally do.

..Though the Vista scheduler seems as braindead as the XP one. if I manually configure Boinc to only use one core Vista will happily bounce the thread around all four cores consuming needless bus resources and wasting countless cycles. Fucking useless microsoft. Why can't they get anything right?

How does the OS know if an app is even capable of being run on any processor other than the first logical one?
I'm not sure it's even possible to program in such constraints. I've certainly never heard of something like that. Rather,any program (thread) seems to run on whatever core it's assigned to by the OS scheduler without knowing or caring which one it happens to be at any one particular moment in time.

How would the OS know if a certain application is capable of running multiple cores simultaenously?
Don't you have that backwards? The smallest atomic level in a program is a thread right? So if a program spawns multiple threads then theOS can schedule them on different CPUs. Like Boinc does when I run Seti then it spawns four threads. One for each physical CPU.

Not sure what happens on a hyperthreaded P4. Presumably it would spawn two threads even though the second logical CPU shares the same physical resources with the first. But that's beyond the scope of my original post.

Now, go start your Doom 3 game. Chances are, with the BOINC / Seti clients going on the other three cores, Doom 3 will happily play along on the first CPU without hiccups.
No the result is virtually the same with 3 Seti processes running as with 4. Makes sense since a fourth Seti process running on the same core as Doom 3 wouldn't get very many cycles - if any at all.

Anyway thanks for your input!

did you find any ?
No. We don't seem to be on speaking terms. Perhaps I shot too many of their buddies in all the SHMUPs I played during my adolescent years.. :cool:

Peace.
 
ps: i thought doom3 was multi core ?

Quake 4 is, and I know the D3 engine itself is capable, but I don't think iD enabled multicore support in Doom 3 even with the latest patch. However, most modern video drivers are multicore aware, so that too might be part of the problem.
 
Back
Top