Next Previous Contents

2. Setting up bproc

How to install bproc:

2.1 Compiling bproc

  1. Patch your kernel with the bproc patch. The patch is provided in patches/bproc-patch-2.2.x. You might do the following:
      $ cd /usr/src/linux
      $ patch -p1 < ~/bproc/patches/bproc-patch-2.2.x
    
    The patch provided is against linux-2.2.10.
  2. Build the new kernel and modules. Modules for an old kernel will not work with the new one since some important structures are changed.
  3. Reboot with the new kernel.
  4. Edit Makefile.conf in the top level bproc directory to agree with your kernel configuration. Make sure you specify the source directory for the kernel patched in step 1. Building the modules will require some new files and definitions created by that patch.
  5. Build the kernel modules, the daemons, libbproc and the client programs by running make in top level bproc directory.

2.2 Running bproc

There are two daemons and four kernel modules involved in bproc. The kernel modules are ksyscall.o, vmadump.o, bproc_ghost.o and bproc_masq.o. The kernel modules can be found in the kernel directory.

  1. Create a machine configuration file. This is a file present on the front end which is read by the master daemon and describes the entire machine. This file normally lives in /etc/bproc.conf but its location can be specified to the master daemon with -c.

    Here is a sample configuration file from a real cluster. The front end node is called manager and the nodes are named e1-e64. These are all real host names. The master daemon will translate these to IP addresses via the normal resolver mechanisms. The manager daemon will be listening at port 2223. The "bind" directive is optional but useful to make sure the master daemon is only listening on the internal cluster network.

    # Sample node configuration file.
    bind manager 2223
    # Node list
    # each node line begins with "node" and has either a host name or an IP address
    node  e1  e2  e3  e4  e5  e6  e7  e8  e9 e10 e11 e12 e13 e14 e15 e16
    node e17 e18 e19 e20 e21 e22 e23 e24 e25 e26 e27 e28 e29 e30 e31 e32
    node e33 e34 e35 e36 e37 e38 e39 e40 e41 e42 e43 e44 e45 e46 e47 e48
    node e49 e50 e51 e52 e53 e54 e55 e56 e57 e58 e59 e60 e61 e62 e63 e64
    

    Bproc can also be run on a single machine. Here is a sample configuration file for doing that. Notice that the node addresses are all from the loop-back network.

    node 127.0.0.1 127.0.0.2 127.0.0.3
    

    The master daemon will assign node number 0 to the first entry in the node lists, 1 to the next and so on.

  2. Create the bproc /dev entries.
    # /bin/mknod -m 600 /dev/bproc_masq  c 10 222
    # /bin/mknod -m 600 /dev/bproc_ghost c 10 223
    # /bin/mknod -m 400 /dev/bproc_iod   c 10 224
    
  3. Install bproc kernel modules on the master and slave nodes.

    On the front end do:

    # insmod kernel/ksyscall.o
    # insmod kernel/vmadump.o
    # insmod kernel/bproc_ghost.o
    

    On the slave nodes do:

    # insmod kernel/ksyscall.o
    # insmod kernel/vmadump.o
    # insmod kernel/bproc_masq.o
    

  4. Run the bproc master daemon. The master daemon must always be started first since it accepts connections from the slave daemons.
  5. Run the bproc slave daemon on the slave nodes. If the front end node is called manager and the master is running on port 2223, you would do the following
    # daemons/slave manager 2223
    

The master daemon updates /var/run/bproc whenever new slaves connect to the system or slaves die. The first line of this file is the number of nodes in the system. Every line after that contains a 1 or a 0 and an IP address. The IP address is the IP address of the node. A 1 indicates that the slave is currently connected to the master and is therefore available for use.

2.3 Installing libbproc development files

A bproc library intended for use by user programs is provided in the clients directory. The library and headers can be installed by running make install in the clients directory. Both a static and a dynamic version of the library are included. If you are using the dynamic library, don't forget to install them on the slave nodes as well since they may be needed by processes after migration.


Next Previous Contents