Donate your spare CPU cycles to Folding@home

If you have never heard of it, Folding@home is a distributed computing effort run by the Pande lab at Stanford University researching the “folding” of proteins.  The idea is simple; instead of building an expensive supercomputer to model protein folding, allow ordinary people to donate their spare CPU cycles.

Most modern computers spend an inordinate amount of time at idle; even my ancient laptop with its Mobile Pentium 4 at 2.66Mhz is usually showing in excess of 85% idle when running no applications on Natty.  FAH (as Folding@home is usually abbreviated to) aims to use this spare capacity of hundreds-of-thousands of machines around the world and you can contribute too.

To make this a bit more fun for the donors, FAH has points awards for all work done so you can compete against other donors.  And as an individual may only be able to make small contributions you can join a team to sum the contributions of all the members.

All you need is a computer (Linux, Windows, or Mac) where you can install the client – and it needs to be one which the owner gives you permission to install the software on.  The client will run unobtrusively in the background and won’t affect the operation of any other programs; remember the client only uses the spare cycles?  Fire-up Firefox and the FAH client immediately slows whilst the processor deals with the user tasks.  Nor does the computer have to be permanently connected to the internet.  FAH downloads a work package, crunches the numbers, then upload the results when a network is available.  How long the crunching takes depends how fast your processor is but it is likely to be more than 6 hours.

Here I will show you how to get FAH running on your Ubuntu machine in an install and forget manner.

Get a username and passkey

Head over to FAH and search for the username you would like to use to identify your contribution.  Once you have found one that is free, grab yourself a passkey which is like a secret password which ties your username to your email in case there are any problems with results erroneously made in your name.

Join a team (optional)

If you want to join a team, then have a look here.  You will need to note the number of the team.  I’m going to use TeamUbuntu which is team 45104.

Install and configure the client

Make a directory to hold the executables and the work files.

mkdir $HOME/folding
cd $HOME/folding

Download the current client (either 32 or 64 bit depending on your installations – I’m showing 32bit) and extract.

wget http://www.stanford.edu/group/pandegroup/folding/release/FAH6.02-Linux.tgz
tar xzf FAH6.02-Linux.tgz

Then run the configuration with the username, team number, and passkey from above.

./fah6 -configonly

User name [Anonymous]? Basil
Team Number [0]? 45105
Passkey []? your secret key from the email
Ask before fetching/sending work (no/yes) [no]? 
Use proxy (yes/no) [no]? 
Acceptable size of work assignment and work result packets (bigger units
 may have large memory demands) -- 'small' is <5MB, 'normal' is <10MB, and
 'big' is >10MB (small/normal/big) [normal]? 
Change advanced options (yes/no) [no]?

Configure Gnome

Finally copy/paste the following to $HOME/.config/autostart as folding.desktop.  This will automatically start the process in the background when you login.

[Desktop Entry]
Type=Application
Encoding=UTF-8
Version=1.0
Name=folding@home
Exec="cd $HOME/folding ; ./fah6 &"
Icon=Application
X-GNOME-Autostart-enabled=true

To start the client now, just execute the following in the $HOME/folding directory we created before

./fah6 &

Bit of fun

There are plenty of other sites with useful FAH data.  Extremeoverclocking.com has a great stats site which also allows you to produce signatures like this.

If you have a PS3, you can run FAH through Life with Playstation.