Building a small Beowulf cluster II
By Marcel van der Veer
April 2018
Published in category Tech Tips
More on Beowulf, Computational Science, Linux
As described in an earlier post , at home I operate a modest Beowulf type cluster for embarrassingly parallel simulation runs in batch mode. With the experience from that build, I took on building a higher-performance cluster using Debian.
Even when using older machines in a cluster, combined performance can still be acceptable depending on application. A small cluster of older machines is like a freight truck - not the fastest option at low load, but maintaining speed at high load.
Mesoscopic simulation of a phospholipid micelle in water.
An alternative to segmenting a molecular dynamics simulation when the number of nodes in the cluster is small, is to run the actual simulation on one node and computational intensive post-processing on one or two others. In this way the cluster is still dedicated to solving a single problem. This scheme also avoids inter-segment communication which can become a bottleneck.
Drones start in text mode
The best machine in a Beowulf cluster should be the master node with a nice video card and display. Drones however can be started in text mode to save resources. On the net, different ways are described to start Linux in text mode. Contrary to some of those posts, in modern installations meddling with GRUB
configuration is no longer necessary. Suffice giving the command:
# systemctl set-default multiuser.target
# reboot
If at any time one wishes to revert to the graphical environment, issue
# systemctl set-default graphical.target
Connecting drones with the internet
My cluster is small enough to not need dhcp. The master node is connected to the world through a wireless connection to a router that connects to the internet. Not all drones have a wireless connection, but it is not hard to share the wireless connection on the master to the drones. I use ufw
as front-end to ip-tables
and then the procedure to make internet cluster-wide available is documented here and there in the forums - with a few small catches … first we set up ufw
# apt install ufw
and then activate the firewall … but take care when doing this in a ssh
session with a drone, because a fresh firewall without rules will by default deny anything and lock you out of the drone! So we issue
# ufw enable && ufw allow ssh
and we remain connected. First we set DEFAULT_FORWARD_POLICY
with
# vi /etc/default/ufw
...
DEFAULT_FORWARD_POLICY="ACCEPT"
Then we uncomment net/ipv4/ip_forward=1
to allow forwarding packages, with
# vi /etc/ufw/sysctl.conf
...
# Uncomment this to allow this host to route packets between interfaces
net/ipv4/ip_forward=1
#net/ipv6/conf/default/forwarding=1
#net/ipv6/conf/all/forwarding=1
Finally we set up NAT
before the *filter
rules. Suppose the physical wireless interface is wan
on the master node. Then we edit as follows
# vi /etc/ufw/before.rules
...
# Add rules for NAT table -- MvdV
*nat
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 10.2.2.0/24 -o wan -j MASQUERADE
COMMIT
Now every machine with IP address 10.2.2.N
can enjoy an internet connection after we restart ufw
# service ufw restart:
The master node interface is 10.2.2.1
. Now on the client side, say on drone 10.2.2.2
with interface eth
we enter in /etc/network/interfaces
a section:
# vi /etc/network/interfaces
...
auto eth
iface eth inet static
address 10.2.2.2
netmask 255.255.255.0
network 10.2.2.0
gateway 10.2.2.1
dns-nameserver 8.8.8.8
In the forums, the last two lines are often forgotten (or taken for granted perhaps); without gateway
you cannot connect outside the LAN since your packets are not transferred by the master node, and without a nameserver you will have an internet connection that works with IP adresses but not with URLs which is not very useful. Actually, you need to have already installed a DNS service on the drone, for instance
# apt install resolvconf
Hence connecting drones to the internet can be a chicken-egg problem - you need internet to install stuff to connect to the internet. I just used a mobile phone as AP with USB tethering during the set up.
Message Passing Interface
Various sources will tell you that there is no software package that defines a Beowulf cluster. But a Beowulf is dedicated to a single task so there must be communication between nodes, which is generally handled by a message passing interface for which there are excellent solutions available. Even so, I did not install an independent message passage interface. The cluster is dedicated to one application and I designed that application to handle inter-process communication itself. The program detects nodes that are online on the LAN, rates their performance, schedules subtasks based on that rating and synchronises them. This also facilitates sustainability: for less demanding jobs, nodes can be left in energy-saving mode which contributes to solving a problem in an energy efficient way.
Updated on 18-11-2019
All blog posts
|
When I was a student in the 1980's, science undergraduates took a course in structured programming at the computer science department … [Read more]
Published in category Computing history
|
|
There are many recipes around to convert an obsolete PC into a DIY NAS for use on a Windows-machine network. Here is mine, used to convert a deprecated workstation into a decent NAS for backup purposes … [Read more]
Published in category Tech Tips
|
|
I have released the current source as version 3.0. I have also updated the documentation, Learning Algol 68 Genie … [Read more]
Published in category Algol 68
|
|
When I was a student, the university computing centre offered VM/CMS and MVS/TSO running on IBM (compatible) mainframes. Nowadays it is possible to run those operating systems in emulation … [Read more]
Published in category Computing history
|
|
As the author of Algol 68 Genie I am interested in having access to other Algol 68 compilers for reference purposes. Several years ago I wrote a post on installing Algol68C on MVS. In this post I would like to give an update … [Read more]
Published in category Computing history
|
|
Lately I needed to call on some of my now rusty electronics skills since I came into some older HiFi equipment in need of attention. I consulted the world wide web in search of service manuals and found many more people with an interest in keeping older HiFi in working condition. Now I had the opportunity to combine my passion for electronics, HiFi equipment and music … and do not forget durability, since we are actually extending the life of otherwise obsolete products … [Read more]
Published in category Tech Tips
|
|
As described in an earlier post, at home I operate a modest Beowulf type cluster for embarrassingly parallel simulation runs in batch mode. With the experience from that build, I took on building a higher-performance cluster using Debian … [Read more]
Published in category Tech Tips
|
|
Every year my daughter's high school invites parents to partake in an evening of information sessions, to help students orient themselves on their future. The idea is to have parents from all walks of professional life, each parent discussing half an hour or so with small groups of students who subscribed to your sessions. You are expected to tell about your study and career, and the students are supposed to pose questions. As you will expect, some come well prepared, others must be stimulated a bit. I greatly enjoy those conversations with the next generation who have their lives ahead of them … [Read more]
Published in category Education
|
|
Recently I met during an event at my Alma Mater, the University of Nijmegen, my high school physics teacher. We discussed the chemistry curriculum and remarked that quite some chemistry students capture with difficulty the fundamental principles of thermodynamics. Needless to say that thermodynamics is one of those subjects that serve a chemist for a lifetime. In my humble opinion, one reason for this lack of retention may be the abstraction level in freshmen courses and that this might be improved by spending one or two introductory hours on the basic ideas of thermodynamics in a historic context … [Read more]
Published in category Science
|
|
Being the author of Algol 68 Genie, people frequently ask me why a physical chemist wrote an Algol 68 compiler. This is an understandable question since people associate Algol 68 with the learned group of mathematicians and computer scientists that conceived the language some fifty years ago and people recall the reputation it had of being a hard to implement language. In this post I would like to give an account of how Algol 68 Genie came to be … [Read more]
Published in category Algol 68
|
|
At home I operate a modest Beowulf type cluster for embarrassingly parallel simulation runs in batch mode. A master node controls several drones. Nodes in this cluster need no more than a server installation, but if a drone happens to have keyboard, mouse and monitor a small GUI is nice to have. This GUI should be lightweight, otherwise a desktop installation makes more sense. This page demonstrates how to set up a drone with GUI on Ubuntu Server including browser, document reader, image viewer and sound … [Read more]
Published in category Tech Tips
|
|
Recently, Algol68C Release 1.3039 was made public for download. This release is derived from the compiler that was in service to the mid 1990's on IBM mainframes. The new release is meant to run on either MVT or MVS. This report documents the installation of the new release on emulated MVS/370 … [Read more]
Published in category Computing history
|
|
This is a translation of the Algol 68 Revised Report into HTML, for distribution with Algol 68 Genie, an Open Source Algol 68 interpreter … [Read more]
Published in category Algol 68
|
|