Unleashing Semaphore: Self-Hosting for Speed
summary
Describes a hybrid setup that replaces per-job Nix stores with a host-level shared Nix store so multiple containers mount the same store, plus an in-network Nix cache and hourly shared git checkouts. Claims concrete speedups: a heavy repo drops from ~24 minutes to about 4 minutes and another from ~9–10 minutes to roughly 5–6 minutes. Notes other wins from avoiding repeated Nix and CAS installs, details colocation on a physical server for cost reasons, and warns of induced demand masking long-term gains.
AI-written summary · about
chapters (16)
- 0:00Introduction and background
- 1:04What is Nix and reproducibility
- 5:27Why optimize CI pipelines
- 6:12Parallelization vs processing power
- 7:19CI time breakdown and bottlenecks
- 8:44Original caching infrastructure
- 9:24Self-hosted Nix cache setup
- 10:34Demonstration of cache sharing
- 11:39Optimizing setup steps
- 12:03Performance improvements results
- 13:38Unexpected developer productivity gains
- 14:27Resource allocation challenges
- 15:13Colocation and hardware choice
- 15:57Limitations and open source projects
- 16:17Key lessons learned
- 16:39La-induced demand and measurement pitfalls
