scenarios where distcc can help

You don't need an enormous custom-built cluster to find distcc useful. Here are some typical scenarios where spending a little while installing distcc can pay off in improved productivity.

workgroup of developers

You work in an office with several other people, each of whom has a PC, workstation or desktop. Perhaps you work on the same project, or perhaps on different projects.

Your project is moderately large, so it takes a while to build: waiting for it disrupts your concentration and makes development less fun. You waste time needing to rebuild when somebody changes a top-level header.

The solution is straightforward: run distcc on other machines, and make sure they have the compiler installed. Your machine can distribute work onto others, with lowered priority to make sure you don't disrupt other people's work. The machines don't need to be centrally administered, and you don't need root to install the daemon.

Depending on your project and infrastructure, compilation time could easily be more than halved.

Faster compilations give you the advantage of being able to do make clean; make all more frequently, which can catch bugs that might be hidden by incorrect Makefile dependencies. It allows test engineers to get builds to test faster. It makes nightly (or hourly? or continuous?) check builds more feasible, so bugs that are checked in can be caught and fixed with less disruption.

In a variation on this, you also have one big machine. Perhaps it primarily acts as a server or master build machine, but you can also use it to accelerate compilation on your workstation or laptop.

sofa computing

At home, you like to use your laptop and wireless to program on the sofa or in the garden. It's convenient to keep all your working directories on the laptop so that you can take it with you wherever you go.

However, it's slow and gets hot when you build a large project. Fortunately, you also have a faster machine in your home office.

Using distcc, you can push most of the work of compilation onto the faster machine. You have the advantage of keeping all your source in one place, but compilation runs at the speed of your fast machine.

working on embedded or small computers

You're developing on a small Linux machine, such as the Zaurus or an embedded PC. It's large enough that you can run editors and work directly on it, but small enough that compilation is painfully slow. On the other hand, developing anywhere else is indirect, and necessitates continually copying files to and fro.

By running the distcc client on the small machine, you can shift most of the work onto a cross-compiler installed on a faster machine, but otherwise work directly on the box.

Copyright © 2002–2004, 2006 Martin Pool.

Send comments to distcc(at)lists.samba.org