Pipelines: VICTORY_PIPELINE_WORKERS sets the worker count #1728

Closed
github-bot wants to merge 1 commit from gh-pr/1728/head into gh-pr/1728/base
Owner

@⁠npanu420 on GitHub · 2026-11-24 21:25 UTC · original
npanu420:pipeline/worker-count → main · +29 −3 · 1 files · 1 commits · closed without merging

What

VICTORY_PIPELINE_WORKERS=n sets the number of host pipeline workers (1 to 64). Without it nothing changes: half the logical processors, 2 to 8. The count is logged (host pipeline workers).

Why

On a first run with an empty pipeline library, the world's pipelines are compiled by the driver on these workers, and draws whose pipeline is not made yet are dropped. On NVIDIA the largest world programs take seconds each. Same machine, same scene (i9-9900X with 20 threads, RTX 3070, Windows 11):

Workers Pipelines made per minute while the queue drained
8 (default) 542 → 106 → 42 → 22 over four minutes (the queue grew to 1,228)
16 109 → 150 per minute; the queue (2,175 at launch, half loaded from the library) emptied before the world started

The two runs did not start from the same library state, so the rates are an indication, not a clean A/B. The CPU stayed below 80 % with 16 workers. CPUs with more threads than 16 may want more, and CPUs with fewer may want less while the title loads.

Changes

  • worker_count(asked, processors) reads the switch, clamped to 1-64, else keeps the default.
  • Test worker_count_takes_the_switch_within_bounds.

Verification

cargo test -p victory-gpu --lib worker_count
cargo clippy -p victory-gpu --all-targets --locked -- -D warnings
cargo xtask policy

No game data is used or committed. AI-assisted (Claude Code).

🤖 Generated with Claude Code

**@⁠npanu420** on GitHub · 2026-11-24 21:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/1728) `npanu420:pipeline/worker-count` → `main` · +29 −3 · 1 files · 1 commits · closed without merging ## What `VICTORY_PIPELINE_WORKERS=n` sets the number of host pipeline workers (1 to 64). Without it nothing changes: half the logical processors, 2 to 8. The count is logged (`host pipeline workers`). ## Why On a first run with an empty pipeline library, the world's pipelines are compiled by the driver on these workers, and draws whose pipeline is not made yet are dropped. On NVIDIA the largest world programs take seconds each. Same machine, same scene (i9-9900X with 20 threads, RTX 3070, Windows 11): | Workers | Pipelines made per minute while the queue drained | |---|---| | 8 (default) | 542 → 106 → 42 → 22 over four minutes (the queue grew to 1,228) | | 16 | 109 → 150 per minute; the queue (2,175 at launch, half loaded from the library) emptied before the world started | The two runs did not start from the same library state, so the rates are an indication, not a clean A/B. The CPU stayed below 80 % with 16 workers. CPUs with more threads than 16 may want more, and CPUs with fewer may want less while the title loads. ## Changes - `worker_count(asked, processors)` reads the switch, clamped to 1-64, else keeps the default. - Test `worker_count_takes_the_switch_within_bounds`. ## Verification ```powershell cargo test -p victory-gpu --lib worker_count cargo clippy -p victory-gpu --all-targets --locked -- -D warnings cargo xtask policy ``` No game data is used or committed. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With an empty pipeline library the driver's compile of the world's largest
programs bounds the first run. On a 20-thread CPU (i9-9900X, RTX 3070),
16 workers emptied the queue about four times as fast as the default 8.
The default is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:42:58 +00:00
github-bot closed this pull request 2026-11-26 04:42:58 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:36 UTC · original

Automated triage for the maintainers.

Merge candidate. worker_count in pipeline/make.rs keeps the old default (half the logical processors, 2 to 8, and 2 when the count is unknown); VICTORY_PIPELINE_WORKERS overrides it, clamped to 1-64, and the count is logged once. The test covers the default, the clamps and an unparsable value. It only reads an environment variable and changes the thread count. Suggestion: add a row to the README switch table. #1861 also adds this switch, so only one should land. CI has not run (it needs approval).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1728#issuecomment-7152069174) <!-- victory-triage v1 head=463e835868ba74b9e3d74dc0f87b57ef2562a340 verdict=merge-candidate at=2026-11-25T03:42:20Z --> Automated triage for the maintainers. **Merge candidate.** `worker_count` in `pipeline/make.rs` keeps the old default (half the logical processors, 2 to 8, and 2 when the count is unknown); `VICTORY_PIPELINE_WORKERS` overrides it, clamped to 1-64, and the count is logged once. The test covers the default, the clamps and an unparsable value. It only reads an environment variable and changes the thread count. Suggestion: add a row to the README switch table. #1861 also adds this switch, so only one should land. CI has not run (it needs approval). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:02 UTC · original

Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing as the narrower of two duplicates. #2250 adds the same switch for the runtime workers and for victory translate's worker pool, with a README row, and the two conflict in make.rs. Whether such a switch goes in will be decided on #2250.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 22:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/1728#issuecomment-7175852345) Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing as the narrower of two duplicates. #2250 adds the same switch for the runtime workers and for `victory translate`'s worker pool, with a README row, and the two conflict in `make.rs`. Whether such a switch goes in will be decided on #2250. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/Marvisak--VIctory!1728
No description provided.