Friday, October 26, 2007

Beowulf: Everybody Needs One

Since my life is so simple and carefree, I decided I needed another project: build a Linux Beowulf Computational Cluster. It actually was easier than I thought. The tough part was retasking my hardware.

I set aside three matched systems to act as nodes. A fourth system is configured as the head. The cluster will be utilizing my standalone MySQL server and file server. I thought (incorrectly) that the head node would only be used as a control point, so it is my application server. This machine runs NIS, Bind, Apache, and Squid.

Starting point was Beowulf HowTo. It's rather old and out of date, but close enough to get things started. The single biggest factor is understanding that their is no beowulf-*.rpm it's lam-*.rpm. (Get it: wolf and lamb.) I didn't need to concern myself with NFS or NIS, as I already had those running.

Build a user, gen and distribute SSH keys. Here's a trick for that one. Since the user is going to be an NIS user, we put their home directory on the NFS server, and configure the nodes to auto mount the home directory.
# ls -s /home/cluso /net/scully/home/cluso
# chown cluso.cluso /home/cluso
(Yes, I know I spelled Clouseau wrong.)

Now, gen the keys, and assign the users public key to the authorized keys file.
$ ssh-keygen -t rsa
$ cp id_rsa.pub authorized_keys
Since our own key is trusted, and we get the same directory no matter where we login, our keys always allow us in.

I ignored all the MPI stuff, since I'm not doing C++ parallel computing. My goal is to be able to schedule Perl scripts across several machines. The benefit of using Beowulf for this rather than a bunch of crontabs, is that Beowulf will load balance the executions. Thus, the fastest node will be asked to execute the greatest number of incarnations of the script.

For the node configuration, two items of importance. First, disable iptables! Swendson emphasizes this fact, and yes you got to do it, or waste allot of time on rules. Besides, we're in a trusted environment. Second, the lamhosts file has moved. It is now /etc/lam/lamhosts.

Initialize the cluster with:
lamboot -v lamhosts
Read the output. It took several tries to get all the nodes to respond. Since we are not doing MPI I could not use mpirun. Instead, the command is:
$ lamexec hostname
baltar.terran.lan
c17.terran.lan
c18.terran.lan
c19.terran.lan

Yeah! Oh wait... It ran on the head node also. Not what I wanted.
$ lamexec n1-3 hostname
c17.terran.lan
c18.terran.lan
c19.terran.lan
Much better. One other small problem is an annoying message about MPI. Let's get rid of that.
$ lamexec n1-3 hostname 2> /dev/null

Now for the real fun. Lets execute 10 runs, without concern for the target nodes.
]$ lamexec -np 10 hostname 2> /dev/null
baltar.terran.lan
c17.terran.lan
c18.terran.lan
c19.terran.lan
baltar.terran.lan
c17.terran.lan
c18.terran.lan
baltar.terran.lan
c19.terran.lan
c17.terran.lan

since we can specify nodes as either n1-3 or n1,3, we have significant control over the processing capacity.

Man, that was easy.

Sunday, October 21, 2007

Penn Oaks Nobel Rot



This was dessert wine I got at the Maryland Wine Festival. The brand, Penn Oaks, is locally based, but not locally grown. On second thought, I'm not thrilled with that prospect because, for all I know, the grapes came from Chernobyl. It was a 5 of 10, but I won't buy it again.

Monday, October 15, 2007

NH Rest Stop



This has got to be my favorite rest stop of all time. Above this Rest Area sign on I-93, is a small sign mentioning a state run liquor store is at this rest stop. Yes, a liquor store, at the rest stop, run by the state. Brilliant!




View Larger Map

What is truly amazing, however, were the prices-- 33% less than I pay in Maryland. Too bad I'm flying home.

Tuesday, October 09, 2007

"Do Not Push"



The tailgate of the dump truck says "Do Not Push". It was hard to resist pushing the truck full of dirt and rocks with my Chevy Monte Carlo, but some how I restrained myself.

Saturday, October 06, 2007

Xen and Fedora 7, Pt 2

There is another issue with Fedora 7. If you elect an interactive install via virt-manager, you do no have the option of a text based install. It must be graphical. Occasionally, however, these have failed.

The problem is one of memory allocation. Under Red Hat Enterprise Linux 5, you must specify more than 512M for an installation. Anything less results in a "not supported" error. On Fedora 7, virt-manager defaults to 500M. If you choose a lesser value, you are threading on thin ice.

There seems to be a sweet spot between 396M and 431M. With memory set to less than 448M, the installation warns that there is not much physical memory, and asks if it can eneable the swap partition for use by the installer. At 256M the system will freeze and the install fails. At 431M, the installation proceeds. Several attempts as 293M resulted in about 50% freezes.

Sorry to say I didn't bang away at it long enough to isolate the exact break point, but there is really no need. If you are critical on memory, and must do an interactive install (as opposed to kickstart), install at 448M, and bump down for production.

Xen and Fedora 7

I've had problems virtualizing Fedora 7 under F7. Seems strange, nothing should be easier. Here's an example:
[root@adama ~]# virt-install -n apollo02
  -f /dev/vg0/xen-apollo01 --nographics -p
  -l ftp://192.168.69.13/f7-64 -r 520
  -x "ks=ftp://192.168.69.13/ks/apollo.ks"
Starting install...
  ... output truncated ...
Write protecting the kernel read-only data: 938k

And the guest locks. Or does it? In reality, the guest is running the kickstart install but the console can not connect. If we try xm console X, we get nothing. If we try to connect through virt-manager, we get nothing. But, as long as the kickstart is fully automated, the install will work.

Let's try this:
[root@adama ~]# virt-install -n fc6vm
  -f /dev/vg0/xen-apollo01 --nographics -p
  -l ftp://192.168.69.13/fc6-64 -r 520
  -x "ks=ftp://192.168.69.13/ks/fc6vm.ks"
Starting install...
  ... output truncated ..
Welcome to Fedora Core

The console launches, and everything works as expected.

Interesting. So... Whats different between the was F7 boots and FC-6? One thing I had noticed was that F-7 boots in the XGA mode (43x80 vs 25x80). I try adding text to the -x option, without luck. Then I tried this:
[root@adama ~]# virt-install -n apollo02
  -f /dev/vg0/xen-apollo01 --nographics -p
  -l ftp://192.168.69.13/f7-64 -r 520
  -x "ks=ftp://192.168.69.13/ks/apollo.ks console=vga"
Starting install...
  ... output truncated ..
Welcome to Fedora

Much to my elation, it worked. One more thing to check, however.
Stay tuned.

Casarsa Chardonnay


Smooth as can be. This Italian chardonnay is value prices, packed in 1.5 liter bottles and oh so sippable. 7 of 10