From dd758e68065d71d755f63792799abbdb900053b3 Mon Sep 17 00:00:00 2001 From: claude-bot Date: Thu, 3 Sep 2026 01:04:02 +0200 Subject: [PATCH] feat(runner): install zstd so the actions cache is not gzipped single-threaded actions/cache -- and actions/setup-go, which builds on it -- packs its archive with zstdmt when zstd is present and falls back to single-threaded gzip when it is not. The archive name says which happened: cache.tzst against cache.tgz. Measured in l.kirchner/patchmgr, CI run 1957. The cache is GOMODCACHE plus GOCACHE and runs to 2-5 GB. runner-gpu has zstd and writes cache.tzst; runner-01, -02 and -03 write cache.tgz, and go test -race (stable) spent 605 seconds packing it for a job with 41 seconds of work. Across all eight jobs of that run, 2312 of 3146 seconds went into this step. This does not settle whether the cache is wanted at all -- in host mode with a persistent home both directories survive between jobs anyway, and patchmgr is switching it off for that reason. But as long as any repository on the instance uses it, it should not be compressed on one core. zstd is a package for the post step, not for jobs, so it sits with the others rather than in a workflow: this runner installs nothing at job time, by design. --- install/runner-install.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/install/runner-install.sh b/install/runner-install.sh index 80751d9..3451e77 100644 --- a/install/runner-install.sh +++ b/install/runner-install.sh @@ -84,13 +84,31 @@ run_user() { runuser -u "$APP_USER" -- env -C "$RUNNER_DIR" HOME="$APP_HOME" "$@ # (Release-Tarball, buf, oder Docker — der Runner hat Docker) statt sie hier # zu heben. # +# zstd: kein Werkzeug fuer Jobs, sondern fuer den Nachlauf. `actions/cache` +# — und damit auch `actions/setup-go`, das darauf aufsetzt — packt seinen +# Cache mit `zstdmt`, wenn zstd vorhanden ist, und faellt sonst auf +# einkerniges gzip zurueck. Der Unterschied ist am Archivnamen zu sehen: +# `cache.tzst` gegen `cache.tgz`. +# +# Gemessen am 02./03.09.2026 in l.kirchner/patchmgr, CI-Lauf 1957: Der Cache +# aus GOMODCACHE und GOCACHE ist dort 2 bis 5 GB gross. Auf runner-gpu (hat +# zstd) heisst er `cache.tzst`; auf runner-01/02/03 `cache.tgz`, und +# `go test -race (stable)` verbrachte damit **605 Sekunden** im Nachlauf bei +# 41 Sekunden Arbeit. Ueber alle acht Jobs waren es 2312 von 3146 Sekunden. +# +# Das ersetzt nicht die Frage, ob dieser Cache ueberhaupt gebraucht wird — im +# Host-Mode mit dauerhaftem Zuhause ueberleben beide Verzeichnisse ohnehin +# zwischen den Jobs, und patchmgr schaltet ihn deshalb ab. Aber solange +# irgendein Repo der Instanz ihn nutzt, soll er nicht einkernig komprimiert +# werden. Belege: .specs/reports/ci-laufzeit-und-cache-2026-09-02.md dort. +# # Bewusst NICHT installiert: sudo. Ein Workflow soll auf diesem Runner nichts # nachinstallieren koennen — was gebraucht wird, steht hier. # # Go selbst gehoert nicht hierher: Projekte holen es ueber actions/setup-go, # weil CI-Matrizen mehrere Fassungen fahren. setup_base_apt git rsync ca-certificates curl \ - make gcc protobuf-compiler libprotobuf-dev + make gcc protobuf-compiler libprotobuf-dev zstd NODE_HAVE="$(command -v node >/dev/null 2>&1 && node -v | sed -E 's/^v([0-9]+).*/\1/' || echo 0)" if [[ "$NODE_HAVE" != "$NODE_MAJOR" ]]; then -- 2.54.0