[TLC] Multi processor SETI Driver question...

Status
Not open for further replies.

cgrow

Seniorius Lurkius
4
Actually the affinity setting doesnt force anything... but it strongly coerces threads to be processed by the same processor. Now... why do I want this you might think?... remember those cache things?.. remember those FPU instruction pipes and branch prediction? They all get hosed when your thead is processed by CPU A then CPU B... so the affinity setting does help.. now how much really depends on your CPU.. with Coppermine CPU having less cache space available the effect for them will be less than say they older 512 cache chips or the big boy Xeon 2MB cache chips.. so the boyz that say it doesnt matter just havent been playing with the big toys yet. Oddly.. I just got my hands on a Dual P4 Xeon with the new HyperThreading.. to Windows this Dual looks like a Quad.. and YES It does help with seti.. I get 4 WU's out every 6 hours on boxes with this configuration with Hyperthreading enables. I get 2 WU's out every 4 hours with Hyyperthreading disables.

Anyways.. remember.. affinity is a good thing.

cgrow
 

Kosmaj

Ars Scholae Palatinae
1,143
I have the same dual 2.2G Xeon box here with 4 virtual CPUs. Do you set CPU affinity on those 4 clients or not? I don't set and I get 4 results out every 5 hrs 30 minutes or something (on typical .4xx WUs).

Now suppose we decide to set the affinity and suppose the 4 WUs we have to process are one VLAR, two .417's and a switie. How will you pair WUs? Since hyperthreads share resources IMO we'd like to avoid two .417's together at the same physical CPU. It will be interesting to run such a test and observe differences. [But not now in the middle of the gauntlet :) ]
 

cgrow

Seniorius Lurkius
4
Kosmaj,

Affinity really just hurts you if you are running 4 virtual procs and only running 2 seti clients... you dont want to lock 2 seti processes utilizing two virtual processors onto one physical processor... (which could happen??) Therefore, I don't use affinity on my system... however when running 4 processes... your using 100% of the CPU so you might as well try to lock each process onto a processor in order to maximize branch prediction, cache, etc. I often leave 2 processes in the backround when I'm using the computer leaving me the other two processors for DevStudio or other applications. This seems to work when the computer isn't dedicated to doing WU crunching at night.

Chris
Chris
 
The SETI Driver Set Affinity option was put in at the request of Xeon 2Mb L2 Cache users. On any smaller L2 cache, the SETI Client generates cache misses anyway. On the 2Mb L2 cache, the SETI Client's data set will fit entirely in the processor cache, in which case forcing hard processor affinity will result in a performance boost.

In Windows NT/2K/XP, forcing Hard Processor Affinity does indeed lock a process onto a subset of the system CPUs. The SETI Driver Set Affinity option works as follows:

for i = 0 to MaxProcesses
if i > NumCPUs then Exit For
APICall_SetProcessAffinity(GetProcess(i)), i)
next i

This results in the first NumCPU Processes being locked onto a single processor. Any additional WU processes remain at "Soft Affinity" and can run on any processor.

Windows defaults to "Soft Affinity". In other words, it will attempt to keep a process on a single processor to avoid extra processor cache flushes and refills. However, if a higher priority process takes over a processor, Windows will move a waiting, ready to execute, process to another processor. With "Hard Affinity", Windows will allow the process to continue to wait for CPU time.

The SETI Driver "Set Processor Affinity" option forces Hard Affinity on the client processes up to the limit of the number of processors avaiable. Note that the transmitting client is always left at "Soft Affinity" - most of its time is spent waiting for the internet.

Mike Ober.
 
Status
Not open for further replies.