distccd
Distribute C/C++ compilation across multiple machines
TLDR
Start a daemon with the default settings
Start a daemon, accepting connections from IPv4 private network ranges
Start a daemon, accepting connections from a specific network address or address range
Start a daemon with a lowered priority that can run a maximum of 4 tasks at a time
Start a daemon and register it via mDNS/DNS-SD (Zeroconf)
SYNOPSIS
distccd [OPTION]…
PARAMETERS
--allow HOST
Allow jobs from this host/IP/mask/netgroup (repeatable)
--blacklist HOST
Deny jobs from this host/IP/mask/netgroup
--daemon
Fork into background (default unless --no-daemon)
--listen ADDR
Bind to this address (default all interfaces)
--log-file FILE
Log to this file (default stderr)
--log-level LEVEL
Set verbosity: critical|error|warning|notice|info|debug
--no-compression
Disable compression of job data
--port PORT
Listen on this TCP port (default 3632)
--user USER
Drop privileges to run as this user/group
--verbose
Increase log verbosity
--version
Print version and exit
-h, --help
Show help
DESCRIPTION
distccd is the server daemon for distcc, a distributed compilation system that speeds up C, C++, and other compilations by spreading jobs across multiple machines on a network.
It listens on a TCP port (default 3632) for requests from distcc clients, which send preprocessed source code. distccd then compiles the code locally using the system's compiler (gcc, clang, etc.), performs assembly, and returns the object file to the client.
Linking remains local to avoid inconsistencies. This enables massive parallel builds on clusters or farms, ideal for large projects like Linux kernel or Chromium.
Key benefits include near-linear speedup with more hosts, low network overhead (compressed CPP output), and simplicity—no shared filesystem needed. However, all hosts must have identical compiler/toolchain versions.
Security is critical: by default, it allows all clients, so use --allow or firewalls to restrict access. Logs help monitor activity.
CAVEATS
Insecure by default: accepts jobs from any host unless restricted with --allow. Use firewalls. Identical compilers required across hosts. High load possible without limits. Not for untrusted networks.
SECURITY BEST PRACTICES
Run as non-root with --user. Restrict with --allow 192.168.0.0/24. Use TCP wrappers or iptables. Monitor logs for unauthorized access.
PERFORMANCE TIPS
Use fast LAN; enable compression unless bandwidth-limited. Match distcc version across cluster. Test with distcc -jN make.
HISTORY
Developed in 2002 by Martin Pool as open-source (GPL) to accelerate Gentoo Linux builds. Gained popularity for kernel compilation. Maintained by distcc community; latest stable 3.4.x integrates better with modern build systems like Ninja.


