# F@H SMP Affinity Changer



## Kursah (Jul 22, 2008)

*F@H SMP Affinity Changer​*_- It Works! (For Most) -​_
I posted this in our TPU F@H thread, Page 70 about half way down ( http://forums.techpowerup.com/showpost.php?p=890295&postcount=1741 ). But I figured I'd start a new thread for it, and put it in my sig.

This little program does wonders for quad cores, allowing you to run 2 SMP clients for a total of 8 threads on a single quad core processor. This can add some serious PPD for output, a couple of drawbacks would be heavier load, and thus slightly higher temps and longer completion of WU's. How it works:



> After some time interval (10 mins) utility checks, if there are 4 processes of FahCore_a1 (one FAH SMP client). If so, and system has 2 CPUs or 2 cores, then utility assigns two processes for each core in some magic way:  first core gets process with maximal memory usage, and process with minimal memory usage. Other two processes are assigned to second core.
> 
> For quad core processors, first SMP client is assigned to 1st and 3rd core, 2nd SMP client assigned to 2nd and 4th core. Assigning affinities on QUAD if you run one SMP client does not make sense.
> 
> ...



_*F@H SMP Affinity Changer*_

_TPU's F@H Thread_, Team# 50711


Feel free to post your results, gripes, praises, complaints, disbeliefs, support here, I am only posting this because my results turned out better than I truly expected out of it...I figured it would maybe do nothing, add 100PPD to each IF THAT...well I was suprised, so I must share! And if you do find this useful, please leave a thanks! 

I know back when I first posted this, using this on AMD processors wasn't doing so well. I'm not sure atm, and would like some feedback on that end of things.


----------



## Kursah (Jul 24, 2008)

How many of you have tried this? So far it's doing pretty good for my rigs, but with my GTX260 showing up shortly and my G/F's rig getting my 9600GT, I'll have more PPD from 2 vid cards than 3 instances of SMP running, though since I'm in a place where I don't pay power (for another month or so...), you better believe I'll have all my CPU power folding!

I'm curious to the results of other CPU's out there! So C'mon post up! I know it's worked for a few of you, and it does a great job for me, like I said before, it's best on Quads, but also improves duals. If you google this, you'll find tons of threads out there about it too!


----------



## Skitzo (Jul 31, 2008)

it's a keeper 

k, I think you may want to make a couple changes/additions to the first post.  You should prolly double check my info cause I only read it once and I've been doing alot of reading in many areas.

the affinity changer monitors the client cores running on the processor.  Every ten minutes (or what ever the time span is) it examines how the resoureces of the cpu are being allocated to fah and re-assigns the cores to maximize performance.  On my c2d (already had 4 a1 cores running) it improved my ppd by ~150.  It also allows you to run multiple instances of the smp client but depending on your hardware, 1 (dual core) or 2 (quad core) are recommended.  
I've read that the affinity changer can impede performance on amd processors; it dropped my am2 by ~25% when I tried it.

We have to keep in mind that getting the highest ppd is nice but stability and accuracy are more valuble to this scientific research.


----------



## Kursah (Jul 31, 2008)

I'll definately update it...I really just wanted to get it out there, and that was a quick posting...very general...

Now that I have TPU results I can update what I have going on here! Thanks Skitzo! I'm off to bed shortly, tomorrow I'll try to remember to update the OP when I get off of work.


----------



## Kursah (Aug 9, 2008)

Well haven't updated the OP yet lol, but I have just updated to the new version of SMP. It supports both x86 and x64 OS's, so we'll see what happens.

I won't do before and after results this time around, if anyone is interested tho, please feel free to do so...I've become more a GPU folder since it's faster and seems to affect the energy consumption a tad...the new CPU SMP client hasn't maxed out any cores yet...it's just started tho and is only about 5 minutes into it's first run.


----------



## mmaakk (Oct 16, 2008)

Thanks a LOT Kursah!

I just finishing the setup. Smooth no errors. Just have some questions:

What about this parameters:

"Set -advmethods flag always, requesting new advanced
 scientific cores and/or work units if available (no/yes)"

I said YES. Is it the best choice?

I'm using a E8400 dual core @ 3.6Ghz. Took me 20 minutes for 1% of the job done. Good or not?

The file "FahCore_78.exe" is using 50% of my CPU, others 25% + 25% are being used by 2 "FahCore_11.exe" from my 2 ATI cards. All OK?

Thanks


----------



## BUCK NASTY (Oct 16, 2008)

mmaakk said:


> Thanks a LOT Kursah!
> 
> I just finishing the setup. Smooth no errors. Just have some questions:
> 
> ...


Let me know how it goes, as I have an E8400(@3.6ghz) and 2 vid cards also. I have difficulty with Affinity Changer and handle my own affinity assignments with "Get & Set Affinity".


----------



## Kursah (Apr 15, 2009)

I realise it's been 182 days since a post has been put in this thread, but I'm going to give v1.05 x64 a shot with 2 SMP console clients on my quad rig for more modern results, I'd like to see others try on other processors too, could be interesting on an i7. There is another thread for more effiecient folding using a virtual client here: 

http://forums.techpowerup.com/showthread.php?t=90596

It has gained great popularity and seems to work very well. To me it seems like more work than one should need to do. I know you can manually deal with affinity, but this little program is handy and very useful for less work. But whether or not it's more effective than the other method is left to be proven...hopefully we can find out and see which is worth it for all the TPU folders out there!


----------

