wiki:MultiHost

Version 2 (modified by Nicolas, 17 years ago) (diff)

Required manual changes to automatic script formatting.

Increasing server capacity

The BOINC server software is designed so that a project with tens of thousands of volunteers can run on a single server computer. However, the capacity of this computer may eventually be exceeded. Symptoms of server overload include:

  • dropped connections
  • slow web site access
  • daemons fall behind
  • database queries take minutes or hours to complete.

BOINC has a scalable server architecture that lets you increase server capacity by adding more computers. The steps are as follows.

Run MySQL on a separate host

When you initially create a BOINC project using make_project, everything runs on a single host: MySQL database server, web server, scheduling server, daemons, tasks, and file upload handler. Of these tasks, the MySQL server does the most work (typically as much as all the others combined). So, if you need to increase the capacity of your server the first step is to move the MySQL server to a separate host (preferably a fast computer with lots of memory). Specify this host in the project configuration file.

Run server daemons and tasks on multiple hosts

If you need more server capacity, you can move some of the server daemons and tasks to separate hosts. (Start by moving the one that's doing the most work).

When you move daemons and tasks to other hosts, those hosts must satisfy the following rules:

  • The project admin account must exist on all hosts, and a user must be able to use 'ssh' to run commands on any other host without typing a password.
  • The hosts must share a common network file system, and path to the project directory relative to the project admin's home directory (typically ~/projects/PROJECT_NAME) must be the same on all hosts.
  • One host is designated as the project's main host in config.xml. The 'start', 'stop', and 'status' scripts should normally be run on the main host (if you run them on a different host X, they'll affect only daemons and tasks on host X).
  • The project admin account on all hosts must be able to access the project's MySQL database. (Exception: data servers and file upload handlers don't need DB access).

Host locations are specified as follows:

Parallelize schedulers and daemons

If you need even more server capacity, you can parallelize most of the BOINC daemons so that multiple instances run on a single (multiprocessor) host, or on different hosts. For example, the following config.xml entries run two instances of the transitioner on the host 'kosh'. Because these instances are on the same host, you must specify different output and PID files.

<daemon>
  <host>kosh</host>
  <cmd>transitioner -d 1 -mod 2 0</cmd>
  <output>transitioner0.log</output>
  <pid_file>transitioner0.pid</pid_file>
</daemon>
<daemon>
  <host>kosh</host>
  <cmd>transitioner -d 1 -mod 2 1</cmd>
  <output>transitioner1.log</output>
  <pid_file>transitioner1.pid</pid_file>
</daemon>

You can run scheduling servers on multiple hosts by running an instance of the feeder on each host, and including the URLs in your master file.