Reduce redundant update evaluation and host rebuild work #57

Closed
opened 2026-07-13 07:57:29 +01:00 by nimmo · 1 comment
Owner

Context

The shared updater invokes nix flake update once per input, repeats home-manager and plasma-manager in two groups, and may rebuild the same host multiple times during one run. Built paths are deduplicated only at Attic push time, after the expensive work has already happened.

The workflow also runs a checks-discovery phase that silently skips when no checks exist, which can look like validation without enforcing any check.

Scope

  • Compute proposed lock changes once where safe, then partition validation by the actual changed inputs.
  • Deduplicate affected hosts and build each final host closure once per candidate lock state.
  • Reuse evaluations/build results across input groups when correctness permits.
  • Avoid running unchanged duplicate input updates.
  • Make the checks phase either meaningful/required or omit it with an explicit summary.
  • Record timing/cache-hit metrics per phase to measure gains.

Completion criteria

  • An unchanged scheduled run performs no host builds.
  • Each host is built at most once for the final accepted candidate set unless isolation requires a documented exception.
  • Duplicate input update calls are eliminated.
  • Run summary reports evaluations, builds, cache pushes, duration, and skipped work.
  • Correctness/isolation guarantees remain covered by tests.
## Context The shared updater invokes `nix flake update` once per input, repeats `home-manager` and `plasma-manager` in two groups, and may rebuild the same host multiple times during one run. Built paths are deduplicated only at Attic push time, after the expensive work has already happened. The workflow also runs a checks-discovery phase that silently skips when no checks exist, which can look like validation without enforcing any check. ## Scope - Compute proposed lock changes once where safe, then partition validation by the actual changed inputs. - Deduplicate affected hosts and build each final host closure once per candidate lock state. - Reuse evaluations/build results across input groups when correctness permits. - Avoid running unchanged duplicate input updates. - Make the checks phase either meaningful/required or omit it with an explicit summary. - Record timing/cache-hit metrics per phase to measure gains. ## Completion criteria - [ ] An unchanged scheduled run performs no host builds. - [ ] Each host is built at most once for the final accepted candidate set unless isolation requires a documented exception. - [ ] Duplicate input update calls are eliminated. - [ ] Run summary reports evaluations, builds, cache pushes, duration, and skipped work. - [ ] Correctness/isolation guarantees remain covered by tests.
Author
Owner

Operational improvement applied on Nova on 2026-07-16: the host-labelled Forgejo runner now has runner.capacity: 2 instead of the default 1.

Rationale and safeguards:

  • allows Attic and auto-update regression jobs to execute concurrently
  • Attic runs remain serialized by their own workflow concurrency group
  • Nova has 32 logical CPUs, 62 GiB RAM, and ~270 GiB free disk
  • historical runner peak was 31 GiB RAM, so capacity is deliberately capped at 2
  • runner v12.10.2 restarted idle and re-declared successfully with label nova

This reduces queue latency but does not replace the build/evaluation deduplication work in this issue. Monitor resource pressure during the first overlapping run.

Operational improvement applied on Nova on 2026-07-16: the host-labelled Forgejo runner now has `runner.capacity: 2` instead of the default 1. Rationale and safeguards: - allows Attic and auto-update regression jobs to execute concurrently - Attic runs remain serialized by their own workflow concurrency group - Nova has 32 logical CPUs, 62 GiB RAM, and ~270 GiB free disk - historical runner peak was 31 GiB RAM, so capacity is deliberately capped at 2 - runner v12.10.2 restarted idle and re-declared successfully with label `nova` This reduces queue latency but does not replace the build/evaluation deduplication work in this issue. Monitor resource pressure during the first overlapping run.
nimmo closed this issue 2026-07-17 12:21:57 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#57
No description provided.