Compiling large C and C++ codebases remains one of the biggest bottlenecks in software engineering and CI/CD pipelines. Between heavy template metaprogramming, massive translation units, and multi-architecture targets, building large projects from source on a standard workstation, a CI runner, or an embedded board can easily eat up hours—or days.
Distributed compilation with distcc has been a proven way to parallelize C/C++ builds across multiple machines for years. However, self-hosting a distcc farm comes with real operational friction:
- Idle hardware costs: Dedicated build servers sit idle most of the day while engineers write or debug code, and high-CPU cloud CI runners still charge you during dependency fetches and sequential linking.
- Toolchain drift: Keeping cross-compilers synchronized across nodes for
x86_64,i686,ARM,AARCH64, andCross-Windowstargets quickly turns into maintenance overhead. - Zero transport encryption: Native
distcctraffic is unencrypted, making it unsafe to expose over the public internet without a VPN layer.
To eliminate permanent infrastructure while keeping builds secure, I built distcc.echse-net.eu (short redirect: distcc.io)—an on-demand, multi-architecture distcc cluster over WireGuard, billed strictly per active compiler CPU-second and data transfer.
Here is how it performs on two notoriously heavy real-world codebases—SeaMonkey 2.53.23 and LibreOffice 25.2.7.2—along with the practical bottlenecks you still have to plan around.
How the Architecture Works
Instead of maintaining permanent build VMs, remote compiler slots act as an elastic extension of your local build system:
- Encrypted Transport via WireGuard: Every client connects through an isolated WireGuard VPN tunnel paired with explicit IP whitelisting. Source code never traverses the public internet in plaintext.
- Pre-Configured Multi-Arch Toolchains: Worker nodes provide ready-to-use toolchains for
x86_64,i686,ARM,AARCH64, andCross-Windows(MinGW). As long as your local compiler prefix matches the target toolchain on the cluster,distccdispatches translation units automatically without requiring identical sysroots on every worker. - Pay-Per-CPU-Second Economics: Usage is metered strictly by actual compiler CPU seconds and VPN data transfer rather than 24/7 server rentals.
Real-World Benchmarks: SeaMonkey 2.53.23 & LibreOffice 25.2.7.2
To measure true wall-clock (real) build times outside synthetic microbenchmarks, full source builds were executed on both multi-core workstations and resource-constrained i686 / ARM devices. Full logs and build recordings are available at echse-net.eu/en/distcc-tests.
1. SeaMonkey 2.53.23 Build Times
| Device & CPU | OS & Arch | RAM | Local Build | Cluster Build (distcc) | Speedup |
|---|---|---|---|---|---|
| ASUS G551 (Core i7-4720HQ @ 2.60 GHz) | Gentoo (x86_64) | 16 GB | 1h 13m (-j10) | 0h 19m (-j10) | 3.8x faster |
| EeePC 901 (Atom N270 @ 1.60 GHz) | Gentoo (x86 / i686) | 2 GB | 21h 59m (-j2) | 3h 47m (-j10) | 5.8x faster |
2. LibreOffice 25.2.7.2 Build Times
| Device & CPU | OS & Arch | RAM | Local Build | Cluster Build (distcc) | Speedup / Notes |
|---|---|---|---|---|---|
| ASUS G551 (Core i7-4720HQ @ 2.60 GHz) | Gentoo (x86_64) | 16 GB | 4h 19m (-j10) | 0h 57m (-j10) | 4.5x faster |
| EeePC 901 (Atom N270 @ 1.60 GHz) | Gentoo (x86 / i686) | 2 GB | 59h 34m (-j2) | 10h 20m (-j10) | 5.8x faster (saves ~49h) |
| Raspberry Pi 3B (Cortex-A53 @ 1.20 GHz) | Raspbian (arm) | 1 GB | — | 5h 15m (-j4) | Stripped minimal config |
| Raspberry Pi 3B (Cortex-A53 @ 1.20 GHz) | Raspbian (aarch64) | 1 GB | — | 5h 32m (-j4) | Stripped minimal config |
| Raspberry Pi 3B (Cortex-A53 @ 1.20 GHz) | Gentoo (arm) | 1 GB | — | 8h 01m (-j8) | Full build + SWAP pressure |
Three Engineering Takeaways From These Runs
1. Preprocessing and Linking Still Dictate Your Ceiling
distcc only distributes the compilation step (cc1 / cc1plus). Header preprocessing (-E) and final linking (ld) always execute on your local machine:
- Use fast local NVMe/SSD storage so preprocessing dozens of parallel translation units doesn't stall on disk I/O.
- Always pair
distccwith a modern parallel linker likemoldorlld(-fuse-ld=mold). Otherwise, sequential linking at the end of a large C++ build immediately becomes your new bottleneck.
2. On Low-RAM SBCs, Memory Runs Out Before CPU
Look at the difference between the Raspberry Pi 3B builds above:
- On Raspbian (
armandaarch64) with a stripped minimal LibreOffice configuration, builds finished in 5h 15m – 5h 32m, and offloadingcc1pluscompletely prevented sustained CPU thermal throttling. - On Gentoo (
arm), LibreOffice was built with full production features and-march=optimizations enabled. Even with compilation offloaded to the cluster, local preprocessing and final linking exhausted the board's 1 GB physical RAM and forced heavy SWAP thrashing—pushing total build time to 8h 01m.
3. Compression Over VPN Matters
Always append ,lzo to your cluster host definition. Preprocessed .i / .ii files can expand to several megabytes per translation unit after header inclusion; LZO compression dramatically cuts VPN bandwidth usage and latency over WireGuard.
Quick Setup: Connecting a Workstation or CI Runner
Integrating remote distcc requires no changes to your CMakeLists.txt or Makefiles.
1. Install the Client and Bring Up WireGuard
Install distcc from your package manager (or use the pre-built .deb, .rpm, or AppImage packages) and bring up your assigned WireGuard interface so your build host can reach the cluster subnet.
2. Configure DISTCC_HOSTS
Enable LZO compression and --randomize to distribute jobs evenly across available cluster slots:
export DISTCC_HOSTS="--randomize 10.x.x.x/16,lzo" 3. Run Your Build
Make / Autotools:
make -j32 CC="distcc gcc" CXX="distcc g++" CMake + Ninja:
cmake -B build -G Ninja \ -DCMAKE_C_COMPILER_LAUNCHER=distcc \ -DCMAKE_CXX_COMPILER_LAUNCHER=distcc ninja -C build -j32 Cross-Compilation (e.g., AARCH64 or Cross-Windows):
make -j32 CC="distcc aarch64-linux-gnu-gcc" CXX="distcc aarch64-linux-gnu-g++" Explore the Logs or Test Your Own Build
If you want to inspect the raw build outputs and terminal recordings, check out echse-net.eu/en/distcc-tests. To test distributed compilation on your own C/C++ project or CI pipeline, visit distcc.echse-net.eu (distcc.io).
How are you currently scaling heavy C/C++ or embedded builds in your CI/CD pipelines?

