aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-25 12:27:15 +0000
committertv <tv@krebsco.de>2026-11-25 12:27:25 +0000
commit58827c3bee1fedeb5f471328b60adea420339a2f (patch)
treeddda66da0b4ced4ba98411d3c9038eeb9d34cacc /README.md
parent39012ddac260255a60bbf99777e9cf1ba9bb219b (diff)
run-firecracker-vm: the guest drops its caches when nixpkgs's commit changes
With --nixpkgs-cache (loose: 7s for nix-instantiate '<nixpkgs>' -A hello, against 20s without), the guest doesn't see changes to the host's nixpkgs until it drops its caches. When nixpkgs is a Git checkout, the run script now checks its commit every 5 seconds, and on a change (checkout, pull, rebase), connects to the guest's vsock port 1235, where layers/nix.nix has fc-drop-caches run. Changes without a commit still need fc-drop-caches by hand.
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8556192..aed5d95 100644
--- a/README.md
+++ b/README.md
@@ -165,7 +165,11 @@ With nix, `/nixpkgs` is the nixpkgs the guest was built from
not cached in the guest, so changes to it show up right away, but
evaluating is slow; `--nixpkgs-cache=loose` caches it (several times
faster, but changes may not show up while the guest runs). Other modes:
-`mmap`, `readahead`, `none` (the default).
+`mmap`, `readahead`, `none` (the default). With a cache mode, and a Git
+checkout, the run script tells the guest to drop its caches whenever the
+checkout's commit changes. For other changes, and in the rare case
+that the guest looked for a store path before the host had it, anyone
+in the guest can drop them: `fc-drop-caches` (it takes seconds).
The guest gets 2 CPUs and 1024 MiB unless told otherwise (`--vcpus N`,
1 to 32; `--mem-size MIB`).