Skip to content

Commit 540e269

Browse files
committed
nix: record the measured integration VM boot profile
Boot spike: 18.7s total, userspace critical chain is dhcpcd -> network- online -> docker, i.e. the remaining cost is functional, not trimmable. microvm.nix evaluated and rejected (boot is ~10-15% of image-load + test). Replace the assumed numbers in the comment with the measured ones.
1 parent 51f8ee0 commit 540e269

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

nix/tests/integration.nix

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,18 @@ in
7575
networking.dhcpcd.denyInterfaces = [ "veth*" "br-*" "docker*" ];
7676

7777
# Trim the guest toward a tiny profile: this VM only needs to boot, run
78-
# docker, and exec one test binary. Boot is ~20s and dominated by dockerd
79-
# init (functional, can't trim) plus default NixOS userspace; dropping doc
80-
# generation and unused services shaves the avoidable part. (A microvm.nix
81-
# guest would go further but still needs a full docker daemon + nested KVM,
82-
# so it is a larger follow-up than this profile for a small boot win against
83-
# the ~2-3 min image-load + test runtime.)
78+
# docker, and exec one test binary. Measured boot is 18.7s (1.7s kernel +
79+
# 3.9s initrd + 13.1s userspace); the userspace critical chain is
80+
# dhcpcd (6.1s) -> network-online.target -> docker.service (+3.5s), i.e. the
81+
# remaining cost is functional (docker waits for the network), not fat to
82+
# trim. documentation + timesyncd off shave the cheap, avoidable part.
83+
#
84+
# microvm.nix was evaluated against this and rejected: it still needs a full
85+
# docker daemon + nested KVM, and boot is only ~10-15% of the 2-3 min
86+
# image-load + test runtime, so a new flake input can't pay itself back. The
87+
# one real lever left, dropping docker's network-online wait (~6s), sits
88+
# right next to the dhcpcd interface races handled below and isn't worth
89+
# destabilising the matrix for.
8490
documentation.enable = false;
8591
services.timesyncd.enable = false;
8692

0 commit comments

Comments
 (0)