PDA

View Full Version : Problems with the SMP client.



Baldy18
01-21-2003, 10:27 PM
Ok I was under the impression that they used diffent registry strings. When I set them both to start on startup only the last one I set takes because they both share the string value of "sb". I tried to set one up with a diffent value but then when the computer started up they both said they were running and progress was going up but cpu usage was 0% according to task manager in Windows XP and the clients were reporting some sort of error in the status window.

Plus some better documentation for the smp client would be appreciated. First of all it isn't an smp capable client like the name would imply it is just the same thing with a different name and different registry values (supposedly).

jjjjL
01-22-2003, 12:04 AM
it is a secondary client. you shoudn't run two copies of the smp.

run the original and the smp. smp should probably be renamed to secondary or something. it was meant to be a temporary work around (i built the client one day for my own dual computer and decided to release it since others might like it) but i never got a real smp version working.

sorry for the confussion. hope that helps.

-Louie

Angus
01-22-2003, 12:26 AM
How about a more-than-2 processor solution?

With the new Hyperthreading Xeons and P4s, a third and fourth copy of the smp client doesn't work. Just tried it today on a dual Xeon system with HT enabled. The 2nd copy of the smp client just restarted the the same work unit. I haven't had a lot of time to fool with it, but it sounds like another installation of the single CPU client into a different folder wouldn't work either.

What's a fella to do...... :bang:

Mierin
01-23-2003, 10:29 PM
Since it just takes a simple call to GetSystemInfo() to find the number of processors, I see no reason why we need to have separate clients. I don't know how hyper-threading affects this call, but if it doesn't count hyper-threads as separate processors I think it is broken.

Anyway if the call is broken, it could just be another config option to say yeah or nay to hyperthreading.

DP

David A. Braun
02-12-2003, 04:24 PM
Originally posted by jjjjL
it is a secondary client. you shoudn't run two copies of the smp.

run the original and the smp. smp should probably be renamed to secondary or something. it was meant to be a temporary work around (i built the client one day for my own dual computer and decided to release it since others might like it) but i never got a real smp version working.

sorry for the confussion. hope that helps.

-Louie

I must say, nothing on the site indicates that it works this way. I installed the SMP client thinking "this is the client which will make the best use of all my CPUs" then was left wondering why it only used 25% CPU (dual Xeon 2.2 with HT enabled - hence 4 virtual processors.) Now I am running the main app + the smp app and am at 50% - pondering trying to run 2 more copies as a different user (hence seperate reg entries) to use the other 50%.

Ideally you would detect the CPUs and act accordingly - spawning multiple threads - preferably processing different blocks of the same n (to faster complete an entire n value rather than spending 4x as long providing partial results for 4 n values.)

For comparison:

1 copy of sb-smp running on 2.2 dual/HT: 261k cEM/s
sb + sb-smp: 167k + 166k = 333k cEM/s = 27.5% improvement

For ref (another machine / single proc) 2.53 : 163k

I suspect that the reason the 2.2 dual outperforms (per instance) the 2.53 single has more to do with the fact that it uses RDRAM vs. DDR than the fact that it has 2 extra "virtual" processors (HT) to work with.

David

Vato
02-12-2003, 04:32 PM
The HT may reduce the impact of various background tasks waking up a every now and again. I wouldn't expect 4 clients running on a dual HT bx to work better than 2 clients though. HT helps context switching performance, but I doubt it give you a whole extra SSE2 pipeline...

MathGuy
02-12-2003, 05:19 PM
since all clients involved are doing the same basic things (and making use of processor resources that are *not* duplicated on a HT processor) you almost certainly would not get much out of a third (or fourth) client on a dual HT box. What seems to get the best performance in my experience (on my dual 2.2 Xeon box) is to run two clients configured with affinity set for CPU 0 and CPU 1, respectively (so that you get optimal cache help).

You might could make a case for running 2 clients with affinity set and a third "floater" (no affinity set) to keep a higher proportion of the processor resources busy, but this might pollute both caches to the point of dropping overall output.

At one point, I looked into "hot patching" the SMP client to make a version that would use a third reg entry in order to test this theory, but the code in the client is obfuscated, so a simple "cache2" -> "cache3" substitution isn't possible (I understand why this is, but was a bit surprised that *all* of the code/data was obfuscated).

Louie: you might consider making a version of the SMP client that retrieves its registry key name from a resource string so that the string can be easily altered to make as many different clients as needed (maybe somebody has a true 8-way box out there to run SoB on!)

If we have such a thing, I'll put together a "starter" utility that fires up (and sets affinity on) as many clients as desired...maybe even make it a service, since many people seem to want that (the free version of FireDaemon will only start one service for you and so you can't use that scheme to start the basic client AND the SMP client).

David A. Braun
02-12-2003, 06:04 PM
Ok, my post was more with regard to the fact that it is not stated that you need to run 2 clients to get the best out of an SMP machine - furthermore not doing things in a certain order (installing sb.exe, then copying sb-smp.exe into the same dir) has weird results in terms of the log file location and reg keys.

As to my idea of running more instances as another user: This does not work because the reg keys used by sb are in HKLM not HKCU. Generally this is bad design, but in this case, since it should not be run by more than one user it is "not so bad." But - that said, I noticed on one of my machines that when another user logged in the app was started for them (on my single proc machine in fact) leading to a less than ideal result - two processes running, trying to handle the same k/n pair and block - on a single proc machine. I then killed the 2nd process and unchecked "start when windows boots" (which really means start when user logs in.)

Basically, I'd like to see a single exe which checks the CPUs (I am fairly certain you can tell the difference between physical and logical processor count) and does "the right thing" - whatever that is. We'd need to test to see if there is actually any benefit to running more threads than the number of physical processors (i.e. somewhere in between the number of physical and logical processors.)

Of course, in the ideal world, this would be a service - but that's a whole 'nother can of worms. At least only put this in the startup folder (or reg key, whichever you are using) for the user who installs the app - to prevent the issue above where a 2nd user can inadvertently execute a redundant process.

David

Mystwalker
02-13-2003, 06:18 AM
AFAIK W2k cannot distinguish between virtual and physical CPU - whereas WinXP (and new Linux versions) can.

David A. Braun
02-13-2003, 11:33 AM
Aye, this is correct - I am running XP however (on my HT machine anyway), and XP is indicated as doing the most work in the 'by OS' charts.

Baldy18
02-17-2003, 04:32 PM
Originally posted by jjjjL
it is a secondary client. you shoudn't run two copies of the smp.

run the original and the smp. smp should probably be renamed to secondary or something. it was meant to be a temporary work around (i built the client one day for my own dual computer and decided to release it since others might like it) but i never got a real smp version working.

sorry for the confussion. hope that helps.

-Louie

I'm not running two instances of the SMP client. I'm runnning one instance of the regular client and one instance of the SMP client.

The string I'm talking about is the one that makes it start when windows starts located at: my computer\hkey local machine\software\microsoft\windows\currentversion\run

When I set the SMP client to start automatically it replaces the value for the regular client to start automatically.

BTW thanks for chastising without even attempting to figure out the situation. Sorry for not explaining myself better.