BOINC the Berkley Open Infrastructure for Network Computing

References

Discussion

BOINC was developed by the Space Sciences Laboratory (SSL) at the University of California, Berkeley, and was originally developed to support the SETI@home project. It is now also used for other distributed applications such as math, medicine, molecular biology, climatology, and astrophysics. BOINC makes it possible for researchers to tap the enormous processing power of personal computers around the world. If your computer spends a lot of time being idle you can support one or more of these projects.

There are three ways to install BOINC. Download a tarball installer from Berkley, install your distro's package, or build from source. The Berkley installer does not require the typical config/make/install cycle which results in 567 errors; instead it is a bash shell script that installs everything into one directory and doesn't require root. One advantage of the Berkley installer is that you get the most recent version. Another advantage is that if you mess up you can just delete the directory and start over. If you're a Linux Noob, do the Berkley installer thing, play with it until you're comfortable with it, then erase that directory and do a distro package install for keeps.

The advantage of the package is updateability and the dependency thing. The Berkley installer hard codes the library module versions. A Debian package install will make symbolic links to the right modules to satisfy BOINC's demands. I had made symbolic links to the 64-bit versions and it seemed to work ok. i.e.

	ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.0.9.8

etc. Finally, the package install is a little more secure because it creates an unpriviledged user to run the daemon as, where the Berkley installer sets things so the daemon runs as you.

Overview

So here is how this works. There are one or more research projects you want to support. You establish an account with each project and in so doing you provide a name (or alias), an email address, and a password. In return, you get a key. Each of those projects have servers that your daemon clients communicate with using the key. Clients and servers can be mixed and matched. The old IBM in the attic may only be able to handle a server from one not-very-demanding project while that Cray in your basement can handle several hundred projects. Your laptop maybe one or two. You decide.

After you create your accounts you visit one of your hosts and "attach" a project to it from one of your accounts.

	boinccmd --project_attach URL key

You do this with as many projects that that host can handle. Then visit your next host, rinse, repeat. Now what will happen is that these servers will start handing out work units (WU) to your computers. The computers will crunch and munch, store up the results and batch them back to the server every so often and the server will hand out some more work units, and so on, as long as the computers are powered on, or until the sun goes nova.

Details

This page will focus on the Ubuntu package install method, so the locations of files may be different than those from the other installation methods or a Debian distro.

	sudo apt-get install boinc

BOINC has both a GUI and a TUI interface. The remainder of this page focuses on the TUI interface because the GUI is intuitive enough to just run and the TUI is, of course, scriptable and, well, is really the way God intended for computers to be used. :)

What you get is

The daemon runs on each host you want to use to contribute to a research effort. A client manager can be run on each host or a single host. The client manager is used to control any of the daemons (assuming they are reachable over the LAN). So one client manager can control all the daemons. Optionally, each host with a daemon can also have a TUI client manager installed along side which can be accessed over SSH. You can have a plain text password (or newline for no password) in /etc/boinc-client/gui_rpc_auth.cfg and a hosts allow file in /etc/boinc-client/remote_hosts.cfg on the remote hosts for some security.

Firewall Issues

Port 80 is used for most communications with the project servers.
Port 443 (HTTPS) is used if the password is being exchanged.
Ports 1043 and 31416 are used for local control as well as for remote control of an instance.
Port 1043 is preferred and 31416 is a fall back.
Unless you are RPC'ing over the Internet (Never recommended) don't open 1043 and 31416 in your non-local firewall specifically for the BOINC client software.

Non-graphics installation

If you have a "headless" computer with no graphics that you intend to administer from another host then you do not want or need the BOINC Manager. In this case just install the client by itself, with the command

	sudo aptitude install boinc-client 

If you are running rkhunter, don't forget to run

	rkhunter --propupd

Using a headless host to create an account with a research project

Find a research project you wish to support and note the URL. Then, from any client manager,

	boinccmd --create_account URL email password name
eg. boinccmd --create_account http://cbl-boinc-server2.cs.technion.ac.il/superlinkattechnion/ me@myisp.com IamIam 'Henry VIII'

You should get back "Success" followed by your key. You only do this once for each research project. You could also do this step from the web browser by visiting the URL

You can now log in to your account for that research project using the URL and password or key and configure how that project can utilize your computer, setting restrictions such as # of processors, time of day, amount of hard drive space, etc. The URL and the key will also be used later as parameters to several boinccmd options. See man 1 boinccmd

Attaching a project to a headless host over SSH

If you lost your key already, you can retreive it with

	boinccmd --lookup_account URL E-mail 'Password'
eg. boinccmd --lookup_account http://setiathome.berkeley.edu/ me@myisp.com 'Secret'

Then attach a project with

	boinccmd --project_attach URL key
eg. boinccmd --project_attach http://setiathome.berkeley.edu 1234567_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p

Then see if you were successful with

	boinccmd --get_messages 0

Or watch the action in real time

	tail -f /var/lib/boinc-client/stdoutdae.txt

Stop or start BOINC daemon at boot

A package install will configure the daemon to start at boot.

To tell the system not to start BOINC at boot:

update-rc.d boinc-client remove

To tell the system to start BOINC at boot:

update-rc.d boinc-client defaults 98

File Locations

Debian

Binaries in default path:

/etc/init.d/
boinc-client
/etc/boinc-client/
cc_config.xml global_prefs_override.xml gui_rpc_auth.cfg remote_hosts.cfg
/etc/bash_completion.d/
boinc
/etc/default/
boinc-client
/usr/bin/
boincmgr boinc boinccmd boinc_cmd boinc_client
/usr/lib/
boinc-client
/var/run/
boinc.pid
/var/lib/boinc-client
Miscellenous data files etc.
/usr/share/boinc-client/
udev-cpu_share
/usr/share/applications/
boinc-manager.desktop
/usr/share/lintian/overrides/
boinc-client
/usr/share/menu/
boinc-manager
Misc directories
/usr/share/doc /usr/share/man /usr/share/locale /usr/share/pixmaps /usr/share/bug /var/lib/dpkg/info /var/cache/apt/archives

Ubuntu

Binaries in default path:

/etc/init.d/
boinc-client
/etc/boinc-client
cc_config.xml global_prefs_override.xml gui_rpc_auth.cfg remote_hosts.cfg
/etc/bash_completion.d/
boinc
/etc/default/
boinc-client
/usr/bin/
boincmgr boinc boinccmd
/usr/lib/
boinc-client
/run/
boinc.pid
/var/lib/update-rc.d/
boinc-client
/var/lib/boinc-client
Miscellenous data files etc.
/usr/share/boinc-client/
udev-cpu_share
/usr/share/app-install/icons/
boincmgr-32.png
/usr/share/app-install/desktop/
boinc-manager:boinc-manager.desktop
/usr/share/applications/
boinc-manager.desktop
/usr/share/menu/
boinc-manager
/usr/share/lintian/overrides/
boinc-dev boinc-client
Misc directories
/usr/share/doc /usr/share/man /usr/share/locale /usr/share/pixmaps /usr/share/bug /var/lib/dpkg/info /var/cache/apt/archives /usr/include/boinc /usr/share/boinc-dev

Quick Takes

For real time viewing of server messages

	tail -f /var/lib/boinc-client/stdoutdae.txt

For real time viewing of server error messages

	tail -f /var/lib/boinc-client/stderrdae.txt

The configuration file /var/lib/boinc-client/global_prefs_override.xml can be used to override global preferences locally. For a complete list of all preferences which can be overridden see This page

After editing, have the daemon read the file with

	boinccmd --read_global_prefs_override

This is the script I use to initialize a new host with an existing account

#!/bin/sh -

BOINCCMD='/usr/bin/boinccmd'
PROJECT='Rosetta@home'
PROJECT_URL='http://boinc.bakerlab.org/rosetta'
EMAIL='me@myisp.com'
PASS='Secret'
LOG='/var/lib/boinc-client/stdoutdae.txt'

echo "Setting up $PROJECT"

KEY=$($BOINCCMD --lookup_account $PROJECT_URL $EMAIL $PASS|grep 'account key'|awk '{print $3}'|tr -d '\n')

echo "Your key is $KEY and it's length is ${#KEY}"

read -sn1 -p "Press any key to continue "

echo "Now attaching project"

$BOINCCMD --project_attach $PROJECT_URL $KEY

tail -f $LOG

exit 0

Running from the Berkley Installer

After unpacking the tarball, change to the BOINC directory and type

	./boinc --daemon
	boinccmgr &
	disown %1

Once everything is set up and running, you don't need to start the manager. Arrange for the boinc daemon to start at boot, and just invoke the manager when you want to manage something or check on progress. When you're done, close the manager window. The daemon will continue to crunch in the background and send results to the project server and get more work. Remember to suspend the daemon before shutting down the computer; either br clicking on the "Pause" button in the GUI or sending

	boinccmd --project URL suspend

Send mail to the Webmaster

logo This site best viewed with a browser
Warning: This is a Debian centric site and MAY contain peanuts.
Many thanks to Debra Lynn and Ian Murdock for making Debian possible
First created Jul 30 2011 ~ Last revised February 12, 2012

Valid XHTML 1.0 Strict Valid CSS!