Advertisment

United we Crunch

author-image
PCQ Bureau
New Update

Supercomputers are meant for running specialized scientific applications, right? Absolutely. But increasingly, they're also being used for running enterprise business applications, or for other compute-intensive tasks that an organization may have. The reason for this is simple. Today a supercomputer can be built using ordinary hardware that doesn't cost that much. Moreover, even the software is easily available for the task. In this article, we'll tell you about a supercomputer that we built in-house using 18 ordinary desktop machines, using OpenMosix, and compared its compute performance against a dual-Xeon server. The results we got were astonishing, to say the least. 

Advertisment

Why OpenMosix?



The best thing about OpenMosix (OM) is that it doesn't require any specific modification in your applications. It uses a technology called SSI (Single System Image) which can take 'x' number of PCs from your network and make them work like a single virtual PC with 'x' number of processors. But because of this, it has some drawbacks as well. OM works very well when you run many tasks simultaneously over it, for instance, converting hundreds of media files from one format to another (eg from WAV to OGG), which is a standard example of batch processing. In such a case, OM will migrate all tasks evenly to all the machines available in the cluster and complete the job significantly faster. However, if you start a single job, which does a huge amount of number crunching, then OM won't give you that performance since it can't divide a single task into multiple threads and migrate them across different nodes of the cluster. 

Where OpenMosix shines



To understand the working of OM, the easiest example we can think of is the following. Try running example 1a and example 1b on an OM cluster and you will see the difference.

The 18 node cluster we built at the labs. The total cost of this system is less than 2.5 lakhs

Advertisment

Example1a



Create a Linux shell script like the following and run on top of an OM cluster.

~/bin/sh



bzip2 testfile1.tar


bzip2 testfile1.tar


bzip2 testfile1.tar


bzip2 testfile1.tar


Example 1b



Create another shell script like the one that follows and run on top of the same OM cluster.

Advertisment

~/bin/sh



bzip2 testfile1.tar &


bzip2 testfile1.tar &


bzip2 testfile1.tar &


bzip2 testfile1.tar &


Imagine the trouble we faced to manage this jungle of wires. But the fun of being able to build a supercomputer is worth it!

Now, when you run both these scripts on the cluster one by one, the first script will take up good amount of resources in one node of the cluster and will also take a good amount of time to complete. But the second one will complete significantly faster and will use more resources in the cluster.

Advertisment

The reason for this is very simple. In the first shell script, we are running the tasks one by one, so in total the script will work as a

single big task. But in the second shell script we are using the '&' switch to start all the tasks at the same time. This makes it five different tasks instead of a single task. In this case, the cluster will be able to migrate the tasks individually to different nodes and as a result will be utilizing the cluster's power more wisely.

Creating a cluster in just 15 minutes



While we had 18 nodes connected via a GBE switch, you need at least three PCs to create a cluster. Then of course, you need OpenMosix. There are two possibilities. One is that you install Linux on all machines and then install OpenMosix on them. This is time consuming and troublesome. Second possibility is to download a Live CD version of the same. This version is known as Clusterknoppix, and its ISO can be downloaded from http://bofh.be/clusterknoppix/ download.htm. If you want to use existing machines on your network for the job, then you wouldn't want to tamper with the OS that's already running on them. That's where the live CD version comes in really handy. 

Graph 1: In this, we've not loaded the cluster heavily. So its performance isn't too different from the other server

Advertisment

Clusterknoppix is nothing but a customized Knoppix-based live distro, which has the OpenMosix kernel and all the required tools pre-compiled into it. Just burn as many copies of the ISO as the number of PCs you want to have in your cluster and reboot all of them with it. You will also need a DHCP server on the same network so that all machines get an IP automatically. 

Here one thing you should keep in mind is that you do not have to spend a single penny to create this cluster as you must be having the required infrastructure. All you need is all or a set of your network nodes free for some time so that you can just reboot them. But still if you want to build something that we built in our labs.The total cost will come to less than Rs 2.4 lakhs including the 18 headless nodes worth around 1.2k (a P4, 256 MB RAM) two racks worth less than 4k, one switch (preferably a Gbe though a normal 100 Mbps one will also do) around 5k. Other involved costs are one to two monitors worth 4 to 8 thousand rupees, 20 network cables worth Rs 500 approximately and finally a set of 18 clusterknoppix CDs that cost around Rs 200 (the cost of blank media) and that's all. Try summing it up and you will see that the you have it ready at a price less than a standard mid-sized server available today. 

Benchmarking OpenMosix



There is nothing like 'real-life' benchmarking to understand the capabilities of any given product. So we decided to build and compare the 18-node OpenMosix cluster against a standard dual Xeon 2.4 GHz processor-based server with 1GB RAM. The cost of his server was nearly equal to the cost of our cluster. 

Advertisment

How we tested



Testing the power of this cluster was a difficult task because tests like kernel compilation, which are generally used to test Linux machines were not sufficient. This is because they don't have the capability to test such a cluster's computing power. So we decided to do something new. First we encoded different numbers of WAV file to OGG format using oggenc encoder. Then we ran the same set of tests on both, the cluster and our dual Xeon server. The result was pretty impressive, as can be seen from the first graph. It shows that the other server took 18 minutes to convert 75 WAV files into OGG whereas the cluster took just 7 minutes for the same task. 

Graph 2: Notice how quickly the OM cluster finishes the job as compared to the single server

But while running this test, one thing we noticed was that the overall consumption of the cluster's processing power was only 10%, so we decided to run some more tests to stretch it more.

Advertisment

Next, we tried to run another set of tests that had more jobs. For this we took sets of 100 to 300 zipped files (around 55 MB in size) and started uncompressing them at the same time. In this case when we crossed 200 files at a time, we were able to stretch the cluster to its maximum. And the result we got was amazing. The time taken to unzip 100 files by the other server was 2.5 times more than the time taken by the cluster to unzip 300 files. Here if you see graph 2, you will notice the massive difference shown by both the systems. 

Conclusion



As it can be observed, the OM cluster is great if you need to perform huge batch jobs. You can create it out of existing hardware on your network if you'd like. Of course, this isn't the only thing that this cluster can do. But that's all for this issue. We'll be back again in our forthcoming issues with more such stories not only about this cluster, but other types of clusters as well. 

Anindya Roy

Advertisment