wiki:MultiHost

Version 4 (modified by davea, 17 years ago) (diff)

--

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.

If you experience these problems, try the following (in order).

Upgrade your hardware

Use a host with good CPU capacity (dual Xeon or Opteron), at least 2 GB of RAM, and at least 40 GB of free disk space. Do whatever you can to make it highly reliable (UPS power supply, RAID disk configuration, hot-swappable spares, tempurature-controlled machine room, etc.). For a high-traffic project, use a machine whose RAM capacity is 8 GB or more and that uses 64-bit processors.

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:

  • Scheduling servers are listed in the project's master page.
  • The hosts on which tasks and daemons are run are specified in the config.xml file.
  • Data servers are listed in template files.
  • File upload handlers are listed in result template files.
  • Your web server runs on the host to which your project URL is mapped.

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.