11.3. OpenMosix

OpenMosix [Prod] is a software package that transforms a set of machines connected by a network under GNU/Linux in a cluster. This balances the workload automatically between the different nodes of the cluster and the nodes can be joined or the cluster left without interrupting the service. The load is distributed between the nodes, taking into account the speed of the connection and the CPU. OpenMosix is part of the kernel (through a Linux Kernel Patch) and maintains total compatibility with GNU/Linux, the user programs, files and resources. Another characteristic of OpenMosix is that it incorporates a powerful and optimised file system (oMFS) for HPC (high performance computing) applications. In Debian Woody, we can install OpenMosix from openmosix-dev (libraries and headers), kernel-pacth- openmosix (OpenMosix patch), openmosix (administration tools). Likewise, it is possible to install mosix (see the documentation for the difference, especially with regard to the licenses, between Mosix and OpenMosix). In Debian versions subsequent to Woody, it is not included as a package (stable) and it will be necessary to go to http://openmosix.sourceforge.net/ to obtain the packages (or resources) and the installation guides (http://howto.x-tend.be/openMosix-HOWTO/).

OpenMosix uses a configuration file that is generally found in en /etc (see documentation for older versions of this file), which is called openmosix.map and which should be in each node. Its format is very simple and each line has three fields: Nodo_ID IP-Address(or hostname) Range-size

An example would be:

1 node1 1
2 node2 1
3 node3 1
4 1
5 1

It is also possible to use a range where the ID and the IP increase respectively. We have to ensure that we have the same configuration and the same version of OpenMosix in each node. To execute OpenMosix, in each node we must type:

setpe -w -f /etc/openmosix.map

We can also use the OpenMosix script (copying it from userspace-tools to /etc/init.d) to start it up during boot.

The oMFS file system permits remote access to all the files in the cluster, as though they were locally mounted. The file systems (FS) of the other nodes can be mounted on /mfs and, therefore, the files in /home on node 3 will be seen on each machine in /mfs/3/home.


All the UIDs (User IDs) and GIDs (Group IDs) of the FS on each node of the cluster must be equal (OpenLdap could be used for this).

To mount the oMFS, we must modify /etc/fstab with an entry such as: mfs_mnt /mfs mfs dfsa = 1 0 0 and to enable or disable it: mfs_mnt /mfs mfs dfsa = 0 0 0.

Afterward, the FS of each node will be seen in mfs/[openMosixNode ID]/. Once installed, it will be possible to execute a very simple script various times, such as, for example (see Howto of OpenMosix):

awk 'BEGIN {for(i = 0;i<10000;i++)for(j = 0;j<10000;j++);}'

And, subsequently, we can observe the behaviour with mosmom or with openmosixview (recommended). OpenMosix has a daemon (omdiscd), which makes it possible to automatically configure the cluster eliminating the need to edit and configure /etc/openmosix.map. This daemon uses multicast to indicate the other nodes that it is also an OpenMosix node, which means that, once omdiscd has booted, this daemon will join the cluster automatically. For this to happen, we need to have the default routing (GW) of the network properly configured. Once it has executed (omdiscd), a series of messages indicating the status of the cluster and the configuration will be generated. We can use the showmap command to see the new configuration generated by omdiscd. OpenMosix provides a set of tools that the administrator can use to configure and tune the OpenMosix cluster. These tasks can be performed with tools in the space of a user (migrate, mon, mosctl, mosrun) or through the /proc/hpc interface. It is important to remember that up to OpenMosix version 2.4.16, the interface was called /proc/mosix and that, since version 2.4.17, it has been called /proc/hpc.

We will now present a summary of the configuration tools that are executed in the space of a user; for /proc/hpc consult the references: