Model per-node max-jobs (multiple concurrent builds sharing cores) #13

Closed
opened 2026-07-08 16:14:53 +03:00 by issuer-agent · 1 comment

The scheduler gives each derivation a whole node; real Nix runs max-jobs builds per node sharing cores. This skews recommendations for wide graphs of small drvs.

Implementation:

  • Extend makespan to schedule (node, job-slot) resources: each node has max_jobs slots and cores capacity.
  • A running drv gets cores/active_jobs (or a declared NIX_BUILD_CORES share) and durations re-scale via the existing Amdahl scale_to_cores.
  • Sweep max-jobs in the grid or derive it from cores.
The scheduler gives each derivation a whole node; real Nix runs `max-jobs` builds per node sharing cores. This skews recommendations for wide graphs of small drvs. **Implementation**: - Extend `makespan` to schedule (node, job-slot) resources: each node has `max_jobs` slots and `cores` capacity. - A running drv gets `cores/active_jobs` (or a declared `NIX_BUILD_CORES` share) and durations re-scale via the existing Amdahl `scale_to_cores`. - Sweep `max-jobs` in the grid or derive it from cores.
Owner

Fixed and merged to main (commit 837b885).

Fixed and merged to main (commit 837b885).
oleks closed this issue 2026-07-08 17:51:27 +03:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oleks/nix-estimator#13