Articles / Linux Cluster Architecture

Linux Cluster Architecture

I've been using Beowulfs for a while now and have seen a number of tutorials, articles, and books on how to go about building a Beowulf cluster or writing programs for a Beowulf cluster. However, when it comes to job scheduling or cluster monitoring, the topic is usually relegated to a small paragraph (or even a few lines) mentioning that using a job scheduling package such as PBS makes one's life easier. I can say from experience that such a statement is very true, but I haven't seen many mainstream articles on implementing a job scheduler or methods and techniques for measuring cluster performance. If you've ever been interested in the implementation of a job scheduling and performance measuring system, "Linux Cluster Architecture" by Alex Vrenios is just what you (and I) have been looking for.

Before discussing the book, I'd like to point out that if you really want to make use of it, you should be comfortable with C and Unix network programming. Though there are a number of clear examples with source code, you will probably want to keep a network programming reference handy (Stevens's Unix Network Programming is my preference).

The book is divided into two parts. The first six chapters delve into the history, background, and theory of multiprocessor architectures. The author also provides a basic overview of Unix networking from both a software and hardware point of view. Finally, he gives an administrator's view of a cluster -- the network topology, the hardware used on nodes, exporting filesystems, remote management tools (r* commands), etc. The last chapter of the introductory portion provides a basic overview of configuring a software development environment on Unix.

The second part is concerned with the main premise, writing software to manage and measure a cluster. The author describes the "Master Slave Interface" architecture (more commonly called the "client server" architecture). He provides code examples for both the client and server processes and shows how to implement concurrent and distributed servers. The second part also discusses performance measurement and analysis of the server as well as the network itself. An important topic touched upon is fault tolerance.

The chapter entitled "Multiprocessor Architecture" does a pretty good job of describing what multiprocessor systems are. It starts by describing the uniprocessor system, then the multiprocessor system, then the various types of multiprocessing systems that exist -- SISD, SIMD, MIMD, etc. The differences between tightly- and loosely-coupled multiprocessor systems are discussed. The chapter also provides some basic details regarding the hardware features for a cluster of computers (which is the book's focus). Overall, it's a pretty basic introduction to what multiprocessor architectures mean.

Chapter 3 is all about Unix networking code. The utility of this chapter depends a lot on how much you know about general Unix networking. The author discusses fork(), execl(), signal handling, shared memory, and semaphores. Actually, "discuss" is not really an apt word, as he basically introduces each concept, then provides a code listing for it. Whether this is useful or not is debatable. In my opinion, if you have some experience with IPC and networking code, the chapter provides a quick brush up on the essentials. It doesn't discuss the nitty gritty of network sockets, shared memory, etc., so don't expect to become a guru network programmer by reading this chapter. If you want to delve into socket programming and IPC, go read a good book devoted to that.

Chapters 4, 5, and 6 are pretty general. Chapter 4 discusses the hardware setup for a cluster -- node machines, cabling, hubs, etc. It doesn't go into too much detail, just provides a general overview. Chapter 5 concentrates on the administrative side of a cluster -- setting up passwords, exporting filesystems, and using the r commands to manage the cluster. It also provides the code for a remote version of cat. This chapter seems to be a little superfluous. As in the previous chapters, the code is simply presented, without much explanation. Personally, that's fine with me; the details of the code can always be studied in other books devoted to the subject. However, the chapter could have been beefed up a little more with regard to filesystems, automounting, etc. Also, there is no mention of ssh for file transfers and other communications within the cluster. I think this is a rather important point that should be mentioned and discussed. The days of r commands are long past. Chapter 6 is once again very general, and provides a brief overview of developing with C and using make to manage projects. This is one chapter that could have been left out; it doesn't provide much useful information for a person who already knows C and has experience with development, and I don't think it would be sufficient for a person who is new to Unix development.

The meat of the book is contained in chapters 7, 8, and 9. Chapter 7 discusses the Master Slave Interface architecture. It discusses and presents the source for a server process which supplies lines from a file to a client. As before, much of the code is more or less standard socket handling code. It presents both serial and concurrent forms of the server. It could have been a little more detailed, but its aim is to quickly lay the foundations for the main question of the book: How do we measure the performance of the Master Slave Interface? This is discussed in the next two chapters.

There are two parts to measuring cluster performance. The first part involves analyzing the response of the network between the clients and the server. Chapter 8 goes into quite a bit of detail, both in explanations and code. Concepts such as network utilization and simulation of arrival times according to different distributions are explained well. Chapter 9 deals with the second part of performance measurements, the behavior of the server itself. Essentially, it talks about profiling the server's execution. Program profiling is a very complex and technical topic, but the author does a pretty good job of explaining why and how one would go about profiling. However, I do feel that, in the end, a developer would probably use a tool such as gprof rather than implement his own profiling code.

Chapter 11 discusses writing robust software, making sure your code can gracefully recover from failures, be it on the network or locally. Alarms, timers, restarting subtasks, reattaching shared memory, and reliable communication over the network are also covered.

The last two chapter discuss general supercomputer applications and summarizes the topics covered in the book

In the end, the book delivers what it promises. However, there are certain features which I think could have been improved. Some topics could have been discussed in a little more detail (the three chapters discussing performance measurement and monitoring and recovering from errors could have used a little more detail) with a few more examples and associated discussion. As I mentioned before, you need to be comfortable with the C language and network programming before reading this book. It contains a lot of code (which I consider to be a good thing; if you talk about code, show it) and though it's not very complex code (only proof-of-concept), details are not provided. You have to either understand it or be ready to look up the details elsewhere.

To sum up, the author does a pretty good job of discussing a topic that is not usually given much importance in general publications about clusters. If you're going to be building, managing, and programming clusters, this book deserves a look.

Recent comments

04 Aug 2007 00:40 Avatar srobert

Linux Enterprise Cluster
another book called "Linux Enterprise Cluster", by Karl Kopper, it is better than this.


Project Spotlight

Kigo Video Converter Ultimate for Mac

A tool for converting and editing videos.


Project Spotlight


An efficient tagger for MP3, Ogg/Vorbis, and FLAC files.