OCAU News - Wiki - QuickLinks - Pix - Sponsors
|23rd April 2010, 10:38 AM||#1|
Join Date: Mar 2010
How to fold efficiently at less than 100% using multiple cores without overheating:
I've recently built a new slim PC. I call it a compromise build, being an i7 860 with 8gb ram stuck inside a lowly 94mm-thick HTPC case). And I've found that it's almost impossible to use the i7 to fold efficiently in such a poorly cooled environment.
I've realised that the current batch of FAH clients don't cater for stock-cooled i5/i7's running Windows very well at all.
The basic folding client, even when run at 100% of CPU, spreads it's load across all 4 of the i7's cores and doesn't run anywhere close the the 'CPU usage' specified in FAH.
ok then, I thought let's try the SMP beta version for windows, but after I (eventually) installed it correctly I saw my CPU load jump, and stay at, 100% - not good for a box with far less than ideal cooling (and before you say it, no I'm not about to upgrade to a larger case or better cooling that won't fit, just for the sake of FAH. I want to be able to not just contribute, but contribute something useful with the system that I've chosen, even if it is a compromise between space-saving and performance)
I tried to turn down the CPU usage of SMP, but it turns out that this is not possible if you read the fine print:
CPU usage requested (5-100) ?
This will adjust the percentage of CPU usage. The FAH client only users spare CPU cycles not used by other programs, so reducing this setting is not typically necessary. However, if you want to lower system temperatures, or reserve CPU cycles for more intensive computer tasks, enter a number below 100. In the SMP client, changing this setting does not reduce CPU usage.
Then after reading a bit here and there about running multiple FAH clients and setting the cpu affinity so that each client runs on a seperate core I thought I'd give that a try and see what happens.
So, here are the steps I took to achieve what I wanted - ie. to fold efficiently on an i7, in Windows 7, without killing my lowly undercooled system by running the FAH SMP client. The following is based on the basic windows graphical FAH client.
1. make 3 more copies of the Folding@home-x86 folder under Program Files\Folding@home or Program Files (x86)\Folding@home.
2. I renamed them to "Folding@home-x86 - 2", "Folding@home-x86 - 3" and "Folding@home-x86 - 4"
3. in each of these 3 copied folders, delete the "work" folder, then run each client and configure the CPU utilisation to less than 100%, then close the each client. Alternatively you can edit each client.cfg file to make the changes.
4. Affinity: I found that if I manually changed affinity via task manager to CPU0/CPU1, CPU2/CPU3 etc pairs for each fahCore_78.exe that was running, this worked fine until a new work unit was downloaded and fahCore_78.exe was restarted thereby clearing the affinity settings ...
4a. google and download coreinfo.exe from microsloth to correctly determine your own physical/virtual core pairing. Coreinfo on my i7 860 showed the following:
Logical to Physical Processor Map:
**------ Physical Processor 0 (Hyperthreaded)
--**---- Physical Processor 1 (Hyperthreaded)
----**-- Physical Processor 2 (Hyperthreaded)
------** Physical Processor 3 (Hyperthreaded)
4b. in my Program Files (x86)\Folding@home folder I setup a batch file which reads:
start /affinity 3 Folding@home.exe
cd "Folding@home-x86 - 2"
start /affinity c Folding@home.exe
cd "Folding@home-x86 - 3"
start /affinity 30 Folding@home.exe
cd "Folding@home-x86 - 4"
start /affinity c0 Folding@home.exe
The flags after each "start /affinity" are 'affinity mappings', written in hex. This is how I determined each flag.
Because I have hyperthreading enabled, I have following the physical/virtual core pairs. I've written the corresponding affinity map, in binary, beside each pair (reads left to right, core 7 to core 0):
CPU0/CPU1 - 00000011
CPU2/CPU3 - 00001100
CPU4/CPU5 - 00110000
CPU6/CPU7 - 11000000
and if you convert each of these 4 binary codes you get 3, C, 30 and C0 respectively (see above usage)
5. place a shortcut to the above batch file in your startup folder and hey presto - all 4 cores are now utilised efficiently for folding, but very importantly (at least for those who don't have the space, cash or desire) not at 100%!
Hope this helps a few compromise-built system owners like me.
Last edited by ned265; 23rd April 2010 at 11:09 AM. Reason: typo
|Join OCAU to remove this ad!|
|2nd May 2010, 11:39 PM||#2|
Join Date: Oct 2008
u can just as easily put -smp 8 at the end of the start in path of the shortcut to make it work 100% on all cores
i7 950, EVGA Classified, 12GB 2000Mhz, 800D, GTX580SLi, HX1000, M4 256GBx2, 12TB HDD, G15+G5, AD700, Dell 3011
What do the ladies say after their 4th orgasm? Thanks PepsiMax!
VW Golf GTI MkVI
|100%, affinity, fah, folding, smp|
Sign up for a free OCAU account and this ad will go away!