by May 6, 2003 0 comments



openMosix is a set of utilities and a kernel patch, which, when implemented on all the Linux PCs on your LAN, turns them into a cluster that can do load balancing between all the CPUs and the RAM. This process-migration feature makes the whole cluster look like a big SMP (Symmetric Multi-Processing) system. The best part is that it can automatically add and remove new nodes when they are started or shutdown without any user intervention. Setting up openMosix is as simple as installing a kernel patch. Let’s see how this can be done.

Install openMosix
We tested openMosix on a full installation of  PCQLinux 8.0. If you are using the Workstation or Personal installation of PCQLinux 8.0 and want to run the graphical-monitoring tool for openMosix (openMosixview), then you also have to install glut-3.7-8.i386.rpm from the PCQLinux 8.0 CD-2. 

You’ll find openMosix.zip file in the Linux section of this month’s Essential CD. Copy it to your machine’s home directory and unzip as follows:

#unzip openMosix.zip 

This will create a folder called openMosix with three .rpm files. Install them one by one as follows and in the same sequence:

#rpm —ivh openmosix-kernel-2.4.18-openmosix4.i686.rpm
#rpm —ivh openmosix-tools-0.2.4-1.i386.rpm
#rpm —ivh openmosixview-1.4-redhat80.i386.rpm 

Here openmosix-kernel-2.4.18-openmosix4.i686. rpm is the kernel patch. openmosix-tools-0.2.4-1.i386.rpm installs all the tools that are used to configure the package, and finally openmosixview- 1.4-redhat80.i386.rpm installs a graphical monitoring and configuration tool for
openMosix.

When you run the
openMosixview,
you’ll see all the nodes in your cluster along with a lot of useful information about them

Configure in a static IP environment 
If your network doesn’t have a DHCP server running or all your Linux systems have their own static IP addresses, then the easiest way to configure openMosix is by entering the list of IP addresses in a file called mosix.map on every system. You’ll find this file in /etc directory, and it looks something like this:

# MOSIX-# IP number-of-nodes

1 192.168.1.229 1
2 192.168.1.222 1
3 192.168.1.74 1
4 192.168.1.10 10

Here, the first column is for the serial number, the second column for the starting IP address of the machines, while the third shows the range of IP addresses beginning from the starting address. For example, the last line of the file shows a range of IP addresses from 192.168.1.10 to 192.168.1.19.

Run the command ntsysv and select openMosix to make it active at booting time. Restart your machines. Now, when grub’s/LILO’s boot-option selection screen appears, you will notice a new kernel entry for openMosix. Select it and let your system boot normally. And, when your systems are up, they are not just separate systems, but a cluster of systems sharing their resources with each other. 

Configure in a dynamic IP environment
If you have DHCP on your network, then it won’t be feasible to change the mosix.map files on each system every time your DHCP server allots an IP address to a Linux node. To reduce this problem, you can use a tool called omdiscd that comes with openMosix. This is a daemon, which automatically discovers all openMosix nodes present on your network. For making this tool work, you have to make a few changes on every Linux system. First run the following command:

#ntsysv

The processes shown in green are running on 
remote nodes

This checks whether the openMosix service is configured to start at boot or not. If it is selected, then de-select it. From now on, the omdiscd command should be run before openMosix starts. omdiscd automatically starts openMosix after discovering the nodes and automatically refreshes it whenever a new node is added to the network. Now, to start this command automatically when your system starts, add it to the user’s .bash_profile file. To do this, just open the file and add the following line at the end and restart the machine.

omdiscd —n ethx

Here ‘x’ is the number of network interface like ‘eth0’ 
Restart your machines, and from now onwards, all machines will be able to recognize each other despite the IP address changes caused by the DHCP server. The only thing is that it continuously sends multicast signals, which take up some network bandwidth. 

Monitor the cluster 
To monitor your cluster, start X-Window on any cluster node that has the openmosixview rpm installed, and run the following command:

#openmosixview

This will pop-up a window that will show a list of all the servers in the cluster, the amount of RAM and processor utilization in each. From here you can configure the load-balancing efficiency of the cluster. Each node has a slider bar that you can move to do the load balancing. When you do this, openMosix will automatically adjust the processes running on each machine. It will automatically migrate them to another node if the existing node is overloaded. You can also migrate the processes manually from one node (processor) to another by selecting the processes option from the toolbar. It will show you a list of the processes that are running. By double-clicking on any process you’ll get another window in which you can choose the node you want to migrate the process to. 

Using the GUI is pretty easy as it lets you quickly configure your cluster as per your requirement. If you want more information about configuring openMosix, there’s a comprehensive ‘how to’ document at

http://howto.ipng.be/openMosix-HOWTO/. Check it out and may your cluster work in peace, or should we say ‘as one piece’!

Anindya Roy

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<