Reusing bazel’s analysis cache by cloning micro-VMs
summary
Build system warm state is preserved by serializing Firecracker VMs so subsequent CI runs reuse Bazel’s in-memory analysis cache, cutting median pipeline time ~8x (multi‑minute runs drop to seconds). Key tools are Firecracker snapshots, plus splitting huge snapshot files (20+ GB) into cacheable chunks and serving memory/disk on demand with userfaultfd and FUSE. Implementation adds copy‑on‑write to avoid clobbering, compresses chunks, and supports remote sharing for scale; remaining costs are snapshot size, initial snapshot creation, and engineering complexity to safely update master snapshots.
AI-written summary · about
chapters (11)
- 0:00MicroVMs and CI bottlenecks
- 1:34Slow CI workflows with Bazel
- 3:40Cloning CI runners for Bazel caches
- 5:26Firecracker microVMs for CI cloning
- 8:55Firecracker snapshot challenges
- 11:22Snapshots for remote caching
- 13:51Userfaultfd for efficient memory access
- 15:38FUSE for disk access and caching
- 17:45CI cloning live demo
- 19:59Production status and integration
- 21:08Q&A
