<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Damian Krasowski</title>
    <description>The latest articles on DEV Community by Damian Krasowski (@damian_krasowski).</description>
    <link>https://dev.to/damian_krasowski</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4267103%2F8d336587-9c96-4621-b34a-ed9ee34052b0.jpg</url>
      <title>DEV Community: Damian Krasowski</title>
      <link>https://dev.to/damian_krasowski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/damian_krasowski"/>
    <language>en</language>
    <item>
      <title>Scaling C/C++ Builds Over WireGuard: Real-World distcc Benchmarks on LibreOffice &amp; SeaMonkey</title>
      <dc:creator>Damian Krasowski</dc:creator>
      <pubDate>Thu, 26 Nov 2026 14:19:54 +0000</pubDate>
      <link>https://dev.to/damian_krasowski/scaling-cc-builds-over-wireguard-real-world-distcc-benchmarks-on-libreoffice-seamonkey-dd3</link>
      <guid>https://dev.to/damian_krasowski/scaling-cc-builds-over-wireguard-real-world-distcc-benchmarks-on-libreoffice-seamonkey-dd3</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Distributed compilation with &lt;strong&gt;&lt;code&gt;distcc&lt;/code&gt;&lt;/strong&gt; has been a proven way to parallelize C/C++ builds across multiple machines for years. However, self-hosting a &lt;code&gt;distcc&lt;/code&gt; farm comes with real operational friction:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Idle hardware costs:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Toolchain drift:&lt;/strong&gt; Keeping cross-compilers synchronized across nodes for &lt;code&gt;x86_64&lt;/code&gt;, &lt;code&gt;i686&lt;/code&gt;, &lt;code&gt;ARM&lt;/code&gt;, &lt;code&gt;AARCH64&lt;/code&gt;, and &lt;code&gt;Cross-Windows&lt;/code&gt; targets quickly turns into maintenance overhead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero transport encryption:&lt;/strong&gt; Native &lt;code&gt;distcc&lt;/code&gt; traffic is unencrypted, making it unsafe to expose over the public internet without a VPN layer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To eliminate permanent infrastructure while keeping builds secure, I built &lt;strong&gt;&lt;a href="https://distcc.echse-net.eu" rel="noopener noreferrer"&gt;distcc.echse-net.eu&lt;/a&gt;&lt;/strong&gt; (short redirect: &lt;strong&gt;&lt;a href="https://distcc.io" rel="noopener noreferrer"&gt;distcc.io&lt;/a&gt;&lt;/strong&gt;)—an on-demand, multi-architecture &lt;code&gt;distcc&lt;/code&gt; cluster over &lt;strong&gt;WireGuard&lt;/strong&gt;, billed strictly per active compiler CPU-second and data transfer.&lt;/p&gt;

&lt;p&gt;Here is how it performs on two notoriously heavy real-world codebases—&lt;strong&gt;SeaMonkey 2.53.23&lt;/strong&gt; and &lt;strong&gt;LibreOffice 25.2.7.2&lt;/strong&gt;—along with the practical bottlenecks you still have to plan around.&lt;/p&gt;




&lt;h2&gt;
  
  
  How the Architecture Works
&lt;/h2&gt;

&lt;p&gt;Instead of maintaining permanent build VMs, remote compiler slots act as an elastic extension of your local build system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Encrypted Transport via WireGuard:&lt;/strong&gt; Every client connects through an isolated &lt;strong&gt;WireGuard VPN&lt;/strong&gt; tunnel paired with explicit IP whitelisting. Source code never traverses the public internet in plaintext.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Configured Multi-Arch Toolchains:&lt;/strong&gt; Worker nodes provide ready-to-use toolchains for &lt;strong&gt;&lt;code&gt;x86_64&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;i686&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;ARM&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;AARCH64&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;Cross-Windows&lt;/code&gt;&lt;/strong&gt; (MinGW). As long as your local compiler prefix matches the target toolchain on the cluster, &lt;code&gt;distcc&lt;/code&gt; dispatches translation units automatically without requiring identical sysroots on every worker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pay-Per-CPU-Second Economics:&lt;/strong&gt; Usage is metered strictly by actual compiler CPU seconds and VPN data transfer rather than 24/7 server rentals.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Real-World Benchmarks: SeaMonkey 2.53.23 &amp;amp; LibreOffice 25.2.7.2
&lt;/h2&gt;

&lt;p&gt;To measure true wall-clock (&lt;code&gt;real&lt;/code&gt;) build times outside synthetic microbenchmarks, full source builds were executed on both multi-core workstations and resource-constrained &lt;code&gt;i686&lt;/code&gt; / &lt;code&gt;ARM&lt;/code&gt; devices. Full logs and build recordings are available at &lt;strong&gt;&lt;a href="https://echse-net.eu/en/distcc-tests" rel="noopener noreferrer"&gt;echse-net.eu/en/distcc-tests&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. SeaMonkey 2.53.23 Build Times
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Device &amp;amp; CPU&lt;/th&gt;
&lt;th&gt;OS &amp;amp; Arch&lt;/th&gt;
&lt;th&gt;RAM&lt;/th&gt;
&lt;th&gt;Local Build&lt;/th&gt;
&lt;th&gt;Cluster Build (&lt;code&gt;distcc&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Speedup&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;ASUS G551&lt;/strong&gt; (Core i7-4720HQ @ 2.60 GHz)&lt;/td&gt;
&lt;td&gt;Gentoo (&lt;code&gt;x86_64&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;16 GB&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;1h 13m&lt;/strong&gt; (&lt;code&gt;-j10&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0h 19m&lt;/strong&gt; (&lt;code&gt;-j10&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.8x faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;EeePC 901&lt;/strong&gt; (Atom N270 @ 1.60 GHz)&lt;/td&gt;
&lt;td&gt;Gentoo (&lt;code&gt;x86 / i686&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;2 GB&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;21h 59m&lt;/strong&gt; (&lt;code&gt;-j2&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;3h 47m&lt;/strong&gt; (&lt;code&gt;-j10&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.8x faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  2. LibreOffice 25.2.7.2 Build Times
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Device &amp;amp; CPU&lt;/th&gt;
&lt;th&gt;OS &amp;amp; Arch&lt;/th&gt;
&lt;th&gt;RAM&lt;/th&gt;
&lt;th&gt;Local Build&lt;/th&gt;
&lt;th&gt;Cluster Build (&lt;code&gt;distcc&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Speedup / Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;ASUS G551&lt;/strong&gt; (Core i7-4720HQ @ 2.60 GHz)&lt;/td&gt;
&lt;td&gt;Gentoo (&lt;code&gt;x86_64&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;16 GB&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;4h 19m&lt;/strong&gt; (&lt;code&gt;-j10&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0h 57m&lt;/strong&gt; (&lt;code&gt;-j10&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;4.5x faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;EeePC 901&lt;/strong&gt; (Atom N270 @ 1.60 GHz)&lt;/td&gt;
&lt;td&gt;Gentoo (&lt;code&gt;x86 / i686&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;2 GB&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;59h 34m&lt;/strong&gt; (&lt;code&gt;-j2&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;10h 20m&lt;/strong&gt; (&lt;code&gt;-j10&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;5.8x faster&lt;/strong&gt; (saves ~49h)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Raspberry Pi 3B&lt;/strong&gt; (Cortex-A53 @ 1.20 GHz)&lt;/td&gt;
&lt;td&gt;Raspbian (&lt;code&gt;arm&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;5h 15m&lt;/strong&gt; (&lt;code&gt;-j4&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Stripped minimal config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Raspberry Pi 3B&lt;/strong&gt; (Cortex-A53 @ 1.20 GHz)&lt;/td&gt;
&lt;td&gt;Raspbian (&lt;code&gt;aarch64&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;5h 32m&lt;/strong&gt; (&lt;code&gt;-j4&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Stripped minimal config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Raspberry Pi 3B&lt;/strong&gt; (Cortex-A53 @ 1.20 GHz)&lt;/td&gt;
&lt;td&gt;Gentoo (&lt;code&gt;arm&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;1 GB&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;8h 01m&lt;/strong&gt; (&lt;code&gt;-j8&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Full build + SWAP pressure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Three Engineering Takeaways From These Runs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Preprocessing and Linking Still Dictate Your Ceiling
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;distcc&lt;/code&gt; only distributes the compilation step (&lt;code&gt;cc1&lt;/code&gt; / &lt;code&gt;cc1plus&lt;/code&gt;). Header preprocessing (&lt;code&gt;-E&lt;/code&gt;) and final linking (&lt;code&gt;ld&lt;/code&gt;) always execute on your local machine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use fast local NVMe/SSD storage so preprocessing dozens of parallel translation units doesn't stall on disk I/O.&lt;/li&gt;
&lt;li&gt;Always pair &lt;code&gt;distcc&lt;/code&gt; with a modern parallel linker like &lt;strong&gt;&lt;code&gt;mold&lt;/code&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;code&gt;lld&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;-fuse-ld=mold&lt;/code&gt;). Otherwise, sequential linking at the end of a large C++ build immediately becomes your new bottleneck.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. On Low-RAM SBCs, Memory Runs Out Before CPU
&lt;/h3&gt;

&lt;p&gt;Look at the difference between the Raspberry Pi 3B builds above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On Raspbian (&lt;code&gt;arm&lt;/code&gt; and &lt;code&gt;aarch64&lt;/code&gt;) with a stripped minimal LibreOffice configuration, builds finished in &lt;strong&gt;5h 15m – 5h 32m&lt;/strong&gt;, and offloading &lt;code&gt;cc1plus&lt;/code&gt; completely prevented sustained CPU thermal throttling.&lt;/li&gt;
&lt;li&gt;On Gentoo (&lt;code&gt;arm&lt;/code&gt;), LibreOffice was built with full production features and &lt;code&gt;-march=&lt;/code&gt; 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 &lt;strong&gt;8h 01m&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Compression Over VPN Matters
&lt;/h3&gt;

&lt;p&gt;Always append &lt;code&gt;,lzo&lt;/code&gt; to your cluster host definition. Preprocessed &lt;code&gt;.i&lt;/code&gt; / &lt;code&gt;.ii&lt;/code&gt; files can expand to several megabytes per translation unit after header inclusion; LZO compression dramatically cuts VPN bandwidth usage and latency over WireGuard.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick Setup: Connecting a Workstation or CI Runner
&lt;/h2&gt;

&lt;p&gt;Integrating remote &lt;code&gt;distcc&lt;/code&gt; requires no changes to your &lt;code&gt;CMakeLists.txt&lt;/code&gt; or Makefiles.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Install the Client and Bring Up WireGuard
&lt;/h3&gt;

&lt;p&gt;Install &lt;code&gt;distcc&lt;/code&gt; from your package manager (or use the pre-built &lt;code&gt;.deb&lt;/code&gt;, &lt;code&gt;.rpm&lt;/code&gt;, or &lt;code&gt;AppImage&lt;/code&gt; packages) and bring up your assigned WireGuard interface so your build host can reach the cluster subnet.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Configure &lt;code&gt;DISTCC_HOSTS&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Enable LZO compression and &lt;code&gt;--randomize&lt;/code&gt; to distribute jobs evenly across available cluster slots:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;DISTCC_HOSTS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"--randomize 10.x.x.x/16,lzo"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Run Your Build
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Make / Autotools:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make -j32 &lt;span class="nv"&gt;CC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"distcc gcc"&lt;/span&gt; &lt;span class="nv"&gt;CXX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"distcc g++"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CMake + Ninja:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cmake -B build -G Ninja \
  -DCMAKE_C_COMPILER_LAUNCHER=distcc \
  -DCMAKE_CXX_COMPILER_LAUNCHER=distcc

ninja -C build -j32
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Cross-Compilation (e.g., &lt;code&gt;AARCH64&lt;/code&gt; or &lt;code&gt;Cross-Windows&lt;/code&gt;):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make -j32 &lt;span class="nv"&gt;CC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"distcc aarch64-linux-gnu-gcc"&lt;/span&gt; &lt;span class="nv"&gt;CXX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"distcc aarch64-linux-gnu-g++"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Explore the Logs or Test Your Own Build
&lt;/h2&gt;

&lt;p&gt;If you want to inspect the raw build outputs and terminal recordings, check out &lt;strong&gt;&lt;a href="https://echse-net.eu/en/distcc-tests" rel="noopener noreferrer"&gt;echse-net.eu/en/distcc-tests&lt;/a&gt;&lt;/strong&gt;. To test distributed compilation on your own C/C++ project or CI pipeline, visit &lt;strong&gt;&lt;a href="https://distcc.echse-net.eu" rel="noopener noreferrer"&gt;distcc.echse-net.eu&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;distcc.io&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;How are you currently scaling heavy C/C++ or embedded builds in your CI/CD pipelines?&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>devops</category>
      <category>linux</category>
      <category>cicd</category>
    </item>
  </channel>
</rss>
