warm: pipeline preparation hangs above 12 jobs on a 24-thread CPU (oversubscription) #325
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem#325
Loading…
Reference in a new issue
No description provided.
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?
@wrz1911 on GitHub · 2026-12-03 14:13 UTC · original
What
victory warm(VICTORY_WARM_JOBS) hangs on this machine above 12 processes: workers start, then all stop making progress;unresponsive for 45 slines are added towarm-bad.txtandwarm-done.txtstays at zero. 12 processes compiles at ~44 pipelines/s (126/s bursts); 14/16/24 do not compile at all.Environment
842767a, release build, rustflags-C target-cpu=x86-64-v3Measurements (log lines "N of 94365, T s")
68 of 93718, 48 searly, later ~44 pipelines/s average (126/s bursts)When hanging: victory.exe overall CPU ~0.3-1.7% (main thread in
ntsync_schedule; worker processes come and go), no new warm-done lines, warm-bad.txt gainsunresponsive for 45 slines. dmesg shows no amdgpu errors (no GPU hang/reset/fault). GTT 15.9 GB / VRAM 16.3 GB, ttm.pages_limit 4070713 (= 15.5 GiB).Hypothesis
Each warm worker seems to use ~2 CPU threads (top shows 100-200% per worker process). 12 workers x 2 = 24 threads = the logical core count here; 14 x 2 = 28 = oversubscribed, and the workers then stop making progress. The default
jobs()incrates/victory-gpu/src/pipeline/prepared.rsismemory.min(cpus * 2 / 3).clamp(1, 16)-> 16 on a 24-thread CPU, which oversubscribes here.Suggestions: cap the default to (logical cores / per-worker threads), or detect "no progress for N seconds" and reduce jobs automatically; and document that over-subscription can hang the compiler rather than just slow it down.
Note
Same effect at 16 (current default) and 24; VICTORY_WARM_JOBS=10 works fine and is what we use now.
@wrz1911 on GitHub · 2026-12-03 14:18 UTC · original
One more factor: this CPU has no SMT
Our CPU (Intel Core Ultra 7 270K Plus, Arrow Lake) has 24 physical cores and 24 logical threads — no SMT. The 7800X3D in the #270 measurements has 8 cores / 16 threads (SMT).
If a warm compile path spins/busy-waits while waiting (spinlock, GPU poll), over-subscribed workers on a no-SMT CPU can starve each other (livelock) — there is no SMT interleaving to guarantee forward progress. This would also explain why 12 jobs (12 x ~2 threads = 24 = physical core count) sits exactly on the boundary, and why machines with SMT (the author test box and most reporters) do not hit it at 32 jobs.
Not a firm conclusion — just a plausible mechanism worth checking in the compile/wait code paths (does anything spin rather than block?). Happy to test patches.
@GreemSC on GitHub · 2026-12-03 21:19 UTC · original
I saw the same stall on a second machine, on a tree with #336.
Machine: i7-12700K (20 logical threads), RX 7900 XT, Linux, Proton-CachyOS Wine. The warm ran in a cgroup limited to 16 CPUs (
AllowedCPUs=4-19).With 12 processes (
--jobs 12, explicit), on 99,831 known pipelines:unresponsive for 45 swent intowarm-bad.txt;warm-done.txtstayed empty and the load average went up to 69.With 1 process, the same pipelines compiled normally. The slowest ones take 22–42 s each, per
slow-pipelines.txt. That is close to the 45 s watchdog even on an idle machine.With 8 processes, it made ~2,000–3,300 pipelines/min with 0 bad, and all 99,831 were done in ~35 min.
So 12 × ~2 threads on 16 CPUs stalls here too, which fits the hypothesis above.
One side effect is worth knowing: the pipelines marked bad during the stall stay in
warm-bad.txtand are skipped by later warms. We had to move that file away for them to be made. Perhaps anunresponsiveentry could be retried once, at a lower job count, before it is kept as bad?