Derive core_scaling from the derivation env, not a 35-entry name table #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
core_scaling(the Amdahl parallel fraction that drives the cores/node axis of the sweep) currently comes only from the ~35-entryHEAVYsubstring table. Any package not on that list getsDEFAULTscaling 0.30 regardless of whether it actually parallelizes — so the cores/node recommendation is a guess for the long tail.Proposal
The
nix derivation showJSON exposes each drv'senv. Read a real per-derivation parallelism signal from it before falling back to the table:enableParallelBuilding = "1"→ high scaling (~0.85).NIX_BUILD_CORES/-jinenv/args/makeFlags→ parallel.dontBuild/ fixed-output / trivial (see #2) → 0.0.Keep the
HEAVYtable as an override for known pathological cases (e.g.ghcscales poorly despite parallel flags), but derive the default from the drv itself. More robust across arbitrary packages than the hardcoded list.Independent of #1–#3; touches
costmodel.cost()only.