Play defaults: helper threads scale with the CPU instead of capping at 2 to 8 #325

Closed
Coder629nx wants to merge 1 commit from Coder629nx/Darner:pr-234-gtahub into main
First-time contributor

This is the CPU-side defaults change carried on CodeFloe as PR #234, ported to this host (branch pr-234-gtahub, one commit on top of main).

What it does: five helper pools that do work a frame waits on stop capping their defaults at 2-8 workers and scale with the logical processors instead - THIN lists and WIDE buffer copies at three quarters of the CPUs (2-16), LAND at half (1-8), UNDER at half with a floor of 6 (6-12), VIEW threads a quarter (4-8) and record threads half (6-12). Touched: crates/darner-gpu/src/shadow.rs, land.rs, list/thin.rs, and the five README rows. No new thread, lock or code path: the pools already ran their work in parallel; only the default count inside the existing clamp changed, and a switch set by hand still wins.

Motivation: the reported profile of the card doing 2-3 ms and standing while the submitting thread spends 20-30 ms with half the cores idle. TrustNo1 ran an A/B on the downtown flight on CodeFloe (#234, 16-core CPU); no number from it is claimed here - see that thread. Nothing was measured where this was prepared; cargo check -p darner-gpu fails with pre-existing errors on an unchanged checkout of main on this machine (pinned toolchain, Linux), so CI decides.

This is the CPU-side defaults change carried on CodeFloe as PR #234, ported to this host (branch pr-234-gtahub, one commit on top of main). What it does: five helper pools that do work a frame waits on stop capping their defaults at 2-8 workers and scale with the logical processors instead - THIN lists and WIDE buffer copies at three quarters of the CPUs (2-16), LAND at half (1-8), UNDER at half with a floor of 6 (6-12), VIEW threads a quarter (4-8) and record threads half (6-12). Touched: `crates/darner-gpu/src/shadow.rs`, `land.rs`, `list/thin.rs`, and the five README rows. No new thread, lock or code path: the pools already ran their work in parallel; only the default count inside the existing clamp changed, and a switch set by hand still wins. Motivation: the reported profile of the card doing 2-3 ms and standing while the submitting thread spends 20-30 ms with half the cores idle. TrustNo1 ran an A/B on the downtown flight on CodeFloe (#234, 16-core CPU); no number from it is claimed here - see that thread. Nothing was measured where this was prepared; `cargo check -p darner-gpu` fails with pre-existing errors on an unchanged checkout of main on this machine (pinned toolchain, Linux), so CI decides.
Five helper pools kept for work the frame waits on (THIN lists, descriptor
views and records, landings, merges under the card's writes, buffer copies
and compares) defaulted to a quarter, three eighths or a half of the logical
processors with caps at 2 to 8, or to fixed counts (4, 6). On a 16-thread
CPU that is 4, 6 or 8 workers while the submitting thread waits on them and
the card stands idle behind the CPU. The defaults now scale: THIN and WIDE
three quarters of the processors (2 to 16), LAND half (1 to 8), UNDER half
with a floor of 6 (6 to 12), VIEWS a quarter (4 to 8) and RECORDS half
(6 to 12). A switch set by hand wins in every case, as before.
Coder629nx closed this pull request 2026-12-04 14:37:26 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
TrustNo1/Darner!325
No description provided.