HOW-TO: Folding@Home competitively

folding

UPDATE: For troubleshooting your F@H setup head to the unofficial Team Hack-A-Day forum.

After announcing the Hack-A-Day Folding Team last week it has become one of the fastest gaining teams. [BillytheImpaler] put together this great guide for not only getting started with folding, but also getting the best folding performance out of your machine. Read on and join the team so we can break into the top 1000!

From Wikipedia

Folding@home is a distributed computing project designed to perform computationally intensive simulations of protein folding. The project’s goal is to add greater understanding to protein folding, misfolding, aggregation, and related diseases. Such diseases include BSE (mad cow), Creutzfeldt-Jakob disease, Alzheimer’s, Parkinson’s, among others.

Folding@home does not rely on powerful supercomputers for its processing; instead, the primary contributors to the Folding@home project are many thousands of personal computer users who have installed a small client program. The client runs in the background, and makes use of the CPU when it is not busy. In most modern personal computers, the CPU is rarely used to its full capacity at all times; the Folding@home client takes advantage of this unused processing power.

The Folding@home client periodically connects to a server to retrieve “work units,” which are packets of data upon
which to perform calculations. Each completed work unit is then sent back to the server.

From a hardware hacker’s point of view it is a project where individuals and teams compete to return the most
completed work in the least amount of time. This guide is intended to help new folders become acclimated to the program
and how to manipulate it and also to help experienced folders tweak their installations to squeeze every last bit of
performance out of their rigs.

Getting started

Go to Stanford’s site and download the appropriate client.
Anyone with a personal computer running Windows 9x, NT, XP, Mac OSX, and Linux will find clients there. BSD users
generally run the Linux client.

Picking a client

There are several different clients available; Text Console, GUI, and Screensaver.

As far as speed is concerned Text Console>GUI>Screensaver. Similarly the clients are different in speed as
well; Windows>Linux>OSX This is due to the availability of compilers for each platform. Linux users can gain
speed by running the Windows console in WINE.

If you’re going for performance *DO NOT* run the screensaver version. It wastes approximately 15% of the CPU’s power
just drawing pretty protein images. The GUI version has been known to interfere with some games so I highly recommend
the console version, especially to hack-a-day’s techier-than-average audience.

This how-to will focus on the console version for windows because it has the greatest performance and is the most
popular choice.

Setup

Run the console by opening it with windows or executing it through the command line.

  • User name [enter a username] pick one that no other H-A-D folder had chosen
  • Team number [44851]
  • Launch automatically at machine startup, installing this as a service [yes]
  • Ask before fetching/sending [no]
  • Use internet explorer settings yes/no yes if you have a proxy, else no
  • Use Proxy yes/no ditto
  • Allow receipt of work assignments and return of work results greater than 5MB in size (such work units may have
    large memory demands) yes/no (if you use the machine for things other than F@H and have less than 256MB RAM
    no, else yes because these units get far better points)
  • Change advanced options [yes]
  • Core Priority [idle]
  • CPU Usage [100]
  • Disable highly optimized assembly code [no]
  • Pause if battery power is being used (useful for laptops) yes/no
  • Interval, in minutes, between checkpoints (3-30) [I choose 15]
  • Request work units without deadlines [no]
  • Ignore any deadline information (mainly useful if system clock has errors) [no]
  • Machine ID (1-8) [1]

The program will now download a WU and begin crunching.

Press Ctrl-C to exit for now.

Open up regedit navigate HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesFAH@C…

You’re going to set keys in the Image Path. After the .exe type a space. And enter the following keys:

FOR all AMD 64 and Intel P4, Xeon (not Pentium Mobile)

-local saves F@H files into the same directory as the console

-verbosity 9 outputs to the log file the most data that the client will allow

-forceasm forces F@H to use SSE and 3DNow assembly optimizations

-advmethods client demands only the newest WUs ***VITAL ON P4S*** on P4s this, combined with Big
WUs=yes will get you QMD work units. These use 300 MB RAM for the first 1-2% then settle down into 200 MB after. Since
they use so much system RAM, they receive *Bonus Points* These units are the best there are because they are so fast
and so highly scored. If you have a P4 you can get these, so I suggest you do.

*QMD Note* Since _all_ AMD athlons do not support SSE2 and SSE3, none will receive QMD work units.
QMDs are an Intel only party, and trust me, they are a party. In the future F@H will contain a CPU-Z-like function
where it identifies hardware specifically to better use participant’s computers. Expect this version to be out in early
2006.

FOR Pentium Mobile

(which BTW are fantastic performers for F@H)

-local

-forceasm

-verbosity 9

Lately, by not setting -advmethods I’ve gotten better WUs (more 600 pointers), I don’t know why, it sees like that’s
what Stanford’s been doing.

Restart the machine to start the service.

Setup for Dual Core, P4 HT, and Dual Processor machines

The setup is exactly the same except for these things.

Put another copy of the console in a *different* directory. Otherwise they’ll interfere with each other.

Set the machine ID of the 2nd to 2, 3 for the 3rd, etc. up to 4. (Sorry to those of you with quad P4EEs, the client
does not support your 16 logical units.)

It is not possible to use both cores/virtual cores with the GUI client so that’s another reason to use the command
line version.

HyperThreading in Pentium 4s is very valuable. Running 2 clients at 100% will run slower than 1 client at 100%, but
it will finish 2 units in the same time it took the other to do 1.5. Thus it is faster in the long run. On my P4 I fold
2 QMDs simultaneously with 512 MB RAM and it is perfectly stable. You might not be so lucky. If you do not want to
receive QMDs for one process or the other, remove the -advmethods flag.

The nice thing about single processor P4 machines is that you can run F@H on one thread and run the OS web browser
and the like on the other extra 15% that HT gives you. This means that you are not going to slow down your progress by
using the machine.

Running F@H

Disable any screensavers, as they rob you of valuable idle processing cycles. I set mine to go blank after 5
minutes, and off after 10 (to save electricity). Leave your machine 24/7 if you can take it. Computers that are off do
not compute anything. Recruit others to fold under your username if you are persuasive.

You will appear on the stats
page
when you have completed a WU. The database servers update about every 3 hours so you might have to wait a few
hours to see evidence of your units, but they’ll show up. You can monitor your progress with
FAHMON or
EMIII. I prefer FAHMON because it uses far less
memory to run and starts up faster. EMIII is more powerful, features visualizations of the proteins, and is able to
monitor multiple clients over a network. Use whichever.

To disable the service for gaming, compiling video encoding, or anything else that you want, run services.msc,
scroll down to the FAH process(es), click on each and select “Stop the service.” Repeat this again to restart it. I
game on my machine with F@H running, but if you’re going to do anything that really kicks your computer’s ass (Doom 3,
Half-Life, that sort of thing) feel free to stop it.

Overclocking

Officially, Stanford pooh-poohs overclocking because it can lead to instability of the simulation. However, this is a
hardware hacker’s site so I’ll discuss it. If your machine is heavily OC’d and you are seeing weird stats reported on
the Team stats page i.e. 5 work units returned but 5 points granted, you probably are seeing early work ends (EWEs).
These are where the simulation reached a point where it could not continue. This is usually caused by an unstable OC,
though not always. If this is the case you should turn your OC down a bit to lend stability to the system. An OC’d rig
is no use to anyone if it is too unstable to execute code. I have a P4 Northwood 2.4GH that I am running at 3.1GHZ
perfectly stable with the stock HP heatsink so it is certainly possible to OC and fold, just don’t over-do it.

Borging

Named after the Star Trek race of assimilation, Borging refers to installing F@H, or any DC program, on someone’s
computer, usually without their knowledge. It is explicitly forbidden by the F@H EULA but folks do it anyway. I have a
few b0rgs out there so I’m not one to tell you not to do it. Just be careful, people have
gotten fired over b0rging. There is a program being
written by a fellow Hack-A-Day team member that examines a computer’s hardware setup and decides, based on how much
RAM, CPU speed, number of CPUs, etc. which way to install F@H for the best, lease invasive, performance. I hoped to
have a beta out for testing with this post, but it is not quite ready for the spotlight yet, so you’ll have to wait to
get your b0rg on.

Conclusion

Have fun. That’s why most people run F@H. It’s not about the science as much as it’s about the competition and the
camaraderie. Folding is an addiction; one of the few healthy addictions known to man. We at Team Hack-A-Day are on one
of the fastest growing teams on the planet, and we’d like to break into the top 1000 worldwide within the next month.
So join up, pay attention to your stats, and have a good time. Get crunching, folks.

Comments

  1. invisisam says:

    first post!

  2. ORANGE says:

    …shortly after I stop F@H too…

  3. Ben Dalton says:

    [H]ardOCP team doesn’t need my help anymore… I’m switching teams :)

  4. Ben Dalton says:

    Also, if you just want to set it up w/o starting a work unit. You can run the console application with -configonly and just enter your options and then manually start the service.

    The first time, for some reason, it didn’t save my username.

  5. ocauer says:

    I’m a folder for Overclockers Australia, come get us! :D

    http://folding.extremeoverclocking.com/team_overtake.php?s=&t=24

  6. perhaps i should have been more clear when talking about registry flags.

    It looks like this on my machine here (Pentium Mobile 1.5:
    C:FoldFAH502-Console.exe -svcstart -verbosity 9 -local -forceasm

    note the spaces between the flags and betqween the first flag and the path. denying PM’s the -advmethods tag really does work, as evidenced by the 600 pointer I’m crunching this very instant.

    btw there’s now a team on our heels (for the first time ever)http://folding.extremeoverclocking.com/team_summary.php?s=&t=44851 those hackers with p4 *must* set bigwus=yes and -avdmethods to recieve some high value QMD love. peace, brothers

  7. Sleighboy says:

    Hey, somebody want to tell me how I can daemonize FAH on Linux? Keeping a terminal window open is not my idea of fun and I want to run it on lots of boxes that getting a monitor to now is quite impractical.

  8. ev1lg00dguy says:

    I’ve been looking for a good distributed computing site. I’m in. :)

  9. endo says:

    #5 be carefull what you wish for :}

  10. sleepysnake says:

    slieghboy: take a look at the “screen” command. Typing “Ctrl-a d” will detach and “screen -r” will reattach.

    I’m curious why the windows client is faster than the linux client. Is there a discussion thread on the folding forums about this ‘compiler issue’?

  11. yuckymucky says:

    i wish that it was possible to transfer the results that you have already folded over to the team. i had a bunch but then when i joined the team it wouldn’t let me bring them over. the bastards.

  12. sleighboy says:

    sleepysnake: Thanks, perfect!

  13. Here’s something interesting from stanford’s site as to why AMD does not recieve qmd units:

    http://folding.stanford.edu/QMD.html

    #What about AMD support? We are currently using the Intel Fortran compiler and libraries. This software intentially runs slowly on AMD CPUs (SSE2 is not supported). While there have been hacks around this issue, such modifications violate Intel’s EULA. At FAH, we follow software EULAs and are thus bound to this limitation imposed by Intel.

    # That’s not fair to AMD chips! Yes, it isn’t fair and AMD is taking actions against this. We hope that things will change, but our hands are tied here. We could give these WUs to AMD machines, but they would have a much worse points per day (less than half of what one gets on Intel hardware) and would not perform well in general.

    So a big part of the problem is that intel refuses to play nice and amd sucks at writing compilers. I dunno.

  14. Tips for convincing your boss to let you b0rg your work machines and thus avoiding the soup kitchens when he fires your ass (assuming you have a job that doesn’t involve a fryolator)

    http://www.hardforum.com/showthread.php?t=928997

  15. Luke says:

    Someone should start a Hack-a-day team for seti@home: http://setiathome.ssl.berkeley.edu/

  16. in case you were worried that f@h might slow down system/gaming performance. here are test results that show that the effect is entirely negligible.

    http://techreport.com/etc/2002q4/foldingimpact/index.x?pg=1

  17. Fred says:

    You won’t have much time to “catch up” as the project is over 82% finished. But I encourage you to try. fred- from “team slashdot”

  18. memorygap says:

    if we have an amd64 that supports SSE2, can we enable this qmd business without ill effects?

  19. to memorygap

    No amount of fiddling will get an AMD64 a QMD work unit. when the program starts it will “benchmark” the fahlog.txt looks like this:

    [03:00:39] – Ask before connecting: No
    [03:00:39] – User name: BillytheImpaler (Team 44851)
    [03:00:39] – User ID: 25B27575FAA1B21
    [03:00:39] – Machine ID: 1
    [03:00:39]
    [03:00:39] Loaded queue successfully.
    [03:00:39] + Benchmarking …
    [03:00:43] The benchmark result is 4812
    [03:00:43]

    This process determines how much RAM is available and identifies the processor. Stanford won’t give you a wu that you can’t handle.

    Since they know what cpu you have they just make sure that if cpu=genuineamd qmd=no. The reason for this silliness is given in post 13. in short intel’s compiler makes binaries that run 2x faster than amd’s. However, intel’s eula won’t allow code generated by its compiler run on amd cpus. ditto for amd’s compiler. you could run a QMD on an amd64 just fine. intel won’t allow it.

  20. cajun says:

    you just used a wikipedia (a GNU item) to make money (from your ads).

    and you call yourselves hackers?

  21. I’m not so sure that borrowing one(1) paragraph from a wiki constitutes using it to make money. h-a-d did not write this article, i did. i did not get paid or compensated in any way. if the gnu folks want to talk to me, they can contact eliot for my email address.

  22. sulk says:

    Hmm, i just got a question, for some reason it seems to be going really, really slow.in fahmon it just says no eta, its at 100% cpue usage running on a 2900+ and a gig of ram, yet iono why it goes so slow (if its going at all), any idea why it goes so slow?

  23. paintist says:

    just fell into this whole distributed computing thing. I’m currently using Boinc (http://boinc.berkeley.edu/)while subscribing to LHC and Predictor. Folding@home is considering to making a boinc-compatible peice and I’m wondering if by using Boinc I’m inhibiting possible usable cycles. Or is it more efficient to run Boinc if subscribed to 2 or more distributed computing programs or running two simultaneously.

  24. in my opinion dont run boinc at all. it’s not as efficient, especially if your are crunching more than one project.

  25. sulk, just give it some time. some units can take up to a week to finish, even on fast machines. bigger units like this are granted more points, so don’t fret. as long as cpu % is where it’s supposed to be, you’re in the clear.

  26. invisisam says:

    i have it running on a few machines now. anyone have problems using the console version on a centrino laptop? my dell 700m just didn’t want to play nice with it, so i have to use the standard version. oh well, in the next few days, i should have some serious points when my WUs finish.

  27. vaio says:

    Nice lil info piece you have here.
    Good luck with your team.

  28. cokebottle_tuque says:

    hi
    I just set up a cupple of broken p4 boxes(bad hard drives)runing http://overclockix.octeams.com/ had to tweak 2 of the files witch are located in /home/knoppix/FAH/server the 2 files you need to tweak as far as i can tell are client.cfg and flags

    client.cfg change the aproprite feilds to your name and team number and any other options you feal like tweaking

    flags for puting in flags like -advmethods

    on a side note overclokix looks to be a nice knoppix remaster I like it

  29. m13a8 says:

    I’m in :D.

  30. In the last 24 hrs we’ve logged more than 13,000 points. That is about 3x our output before this article posted.

    We might actually shake the only threat we’ve ever had (http://folding.extremeoverclocking.com/team_summary.php?s=&t=45862)

    We’re up to 203 active processors and 132 active members, about 120 of which have actually turned-in completed work.

    Keep up the good work ladies and gents.

  31. madmax says:

    Oh, man. we’ve shaken off the team that was threatening to pass us! huzzah, huzzah! Combine that with the fact that we’ve broken into the top 1000 (946 at the moment). we average more than 10,000 points per day. great job, hackers.

  32. cokebottle_tuque says:

    woo we are now ranked 888

  33. flaunt_dzx says:

    I’ve got 2 Athlon XP’s (2900+ and 3000+) One Mac Mini 1.42, and one P4 1.5 running now.

    What is everyone else running? I’d like to know how we’re getting our numbers.

  34. Well I have these at the moment:

    Pentuim M @1.5ghz (mine)
    Celeron 1.2 (mine)
    Athlon 2600+ (mine)
    Pentium M 1.4 (mother’s)
    Pentium M 1.4 (borrowed from the univ for the semester!)
    Pentium M 1.4 (borrowed from the univ for the semester!)
    Pentium M 1.4 (borrowed from the univ for the semester!)
    P4 2.4 @2.8ghz (my dad’s pc)
    P4 2.8 (borg at place of former employment)
    P4 3ghz (computer store borg)

    Slacking for the moment becasue the lab where they live is being painted:
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)
    P4 3.8 (computer lab borg)

  35. flaunt_dzx says:

    How are the laptops handling the extra heat?

  36. the lappies don’t seems to mind. gaming certainly makes them more angry than F@h, possible due to the use of the gpu. i just make sure to leave them positioned in such a way that they recieve good ventilation when i’m not using them. my own personal machine sits on a pedestal of sorts I made long before i started F@h. the others (mostly dell D610s btw) live in a rack under my desk at work. they’ll stay there, happily crunching away until december, when I’ll have to apply for them again. I think i’ll retain them.

  37. invisisam says:

    I have 4 machines running for now.

    P4 3.x GHz tower with 2GB ram – work computer
    P4 2.0 GHz tower with 512MB ram – home
    Pentium M 1.5GHz laptop with 256MB ram – home
    P3 800 MHz laptop with 256MB ram – home

    I’m going to put it on some other machines at work, if I can convince my co-workers it’s not going to bother them.

  38. that sounds great, invisisam. are you getting your share of tasty qmd action with those p4s (especially the one with 2gigs ram)?

  39. flaunt_dzx says:

    Well, it looks like my 3000+ is done. My hd is starting to die it seems.

    Minus one computer. Unless someone wants to send me a new drive? :-)

  40. invisisam says:

    billy, i can’t run f@h with all the heavy duty options at work. i use vmware all day and have anywhere from 2 to 5 vm’s running at once. I have the console running, but with normal settings. The P4 at home is running with all the settings mentioned in the article. That seems to be turning out the 400-500 point WUs.

    I just looked, and I’m number 8 in the team. How `bout `dat!?! :)

  41. hey flaunt_dzx, I don’t have any spare drives, but these folks do: http://www.newegg.com/Product/Product.asp?Item=N82E16822145064R

    invisisam, congratualtions. you are part of the .01% of computer users that actually *use* their hardware.

    If anybody hasn’t noticed, now that we’ve slipped into the top 800 teams (794 atm), EOC lists individual user’s stats at http://folding.extremeoverclocking.com/user_list.php?s=&t=44851
    the graphs are kinda screwed up right now, but that’s becasue it hasn’t had enough sampling intervals. w00t.

  42. hey flaunt_dzx, I don’t have any spare drives, but these folks do: http://www.newegg.com/Product/Product.asp?Item=N82E16822145064R

    invisisam, congratualtions. you are part of the .01% of computer users that actually *use* their hardware.

    If anybody hasn’t noticed, now that we’ve slipped into the top 800 teams (794 atm), EOC lists individual user’s stats at http://folding.extremeoverclocking.com/user_list.php?s=&t=44851
    the graphs are kinda screwed up right now, but that’s becasue it hasn’t had enough sampling intervals. w00t.

  43. w00t!

    top 800! individual user stats now on EOC.

  44. flaunt_dzx says:

    What? No free drive? What a jip! Send me one of those laptops! haha!!!

    No, it’s all cool. Western Digital has an excellent warranty program. For now, Knoppix is my best friend on this machine.

  45. well, OK. you can have one of the laptops. but you have to keep in the cluster, which means under my desk at work*.

    *Deal assumes flaunt_dzx is female, and in the northeast ohio area, else use ubuntu live/knoppix :)

  46. flaunt_dzx says:

    No dice then brosef.

  47. flaunt_dzx says:

    I would just like to add that i feel dirty. Was I just nearly hit on by another man?

  48. invisisam says:

    Sweet, 780 at the moment. And I don’t know if you guys realize, but we are the most active team out there. We have about 97% of ALL of our users are active. There isn’t any other team that can come close to that percentage. Awesome teamwork.

    Now, can i interest anyone in a pyramid scheme, uh, I mean a business opportunity? :)

  49. In the past 6 days, 5 of them have been the biggest day ever up until that point. 97.6% of our users are active, more than any other team with more than 5 members in the top 2000 (all that eoc tracks). We’re ranked 561 at the moment and are averaging more than 24,000 points per day.

    Oh yeah, we’ve gotten out 300th active member and out 475th active cpu. Fantastic.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,598 other followers