mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2684] [Performance]: NUMA-local binding on a dual-socket PC gives +37-40% prompt throughput (GTX 1080 Ti, 2x Xeon E5-2696 v4) #1068
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1068
Loading…
Add table
Add a link
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?
Originally created by @MrKop-git on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2684
What happened
On a dual-socket PC, the engine's pinned expert arena and its CPU pool spread across both NUMA nodes by first-touch. The GPU sits on one socket, so roughly half of its DMA and half of the CPU expert reads cross the inter-socket link. Binding everything to the GPU's node made prompt throughput 37-40% faster and first-token times 27-32% shorter, with no engine change.
Hardware
84:00.0does the computeThe change
--preferred=1: the 46.84 GiB pinned expert arena + 3.09 GiB pinned K/V land on node 1 (the GPU's node). Node 1's 64 GiB holds it beside ~6 GiB of system use.--cpunodebind=1: the expert pool's workers run on node 1's 22 cores (44 threads). This halves the available cores (22 vs 44 spread) — and is still faster, because the 44-core spread paid the 2.1x remote-memory penalty (NUMA distance 10 vs 21) on half its reads.AllowedCPUs=22-43,66-87in a systemd drop-in), so the desktop does not steal cycles from the pool.Also on this box:
vm.nr_hugepageswas 24000 (46.9 GiB reserved for MAP_HUGETLB). The engine needs 23,983 pages but found 8,221 already reserved, so MAP_HUGETLB failed every start and fell back to THP while the idle pool was invisible to normal allocations — the fallback load then tripped systemd-oomd (the unit was killed and restart-looped). Settingvm.nr_hugepages = 0removed the trap; the engine loads with THP + regular pages.Measured (the same suite, same card, same day)
Speeds are the engine's own timings; first-token times are client-side over HTTP;
tools/strata_bench.pysuite, 3 runs per test. Decode is unchanged because it is bound by the AVX-2 expert compute itself (local now, but the same 22 cores), not by memory locality.The PCIe link (Gen3 x16, probe 11.6-11.9 GB/s) carries only ~200-257 MB/s during prompts — the interconnect is not the limiter either way; the win is the CPU-side reads hitting local DDR4 (4 channels ≈ 68 GB/s) instead of UPI (~19 GB/s shared).
What this suggests for setup
A dual-socket PC whose GPU is on one socket gains from a start-time binding to that socket. Setup could read the GPU's
numa_nodesysfs attribute and, when it is >= 0 and the node has RAM for the arena, mention or apply the equivalent ofnumactl --preferred=<gpu_node> --cpunodebind=<gpu_node>. The engine already knows the arena size and the CPU topology. A--numa auto|off|<node>knob would make this a first-class option instead of a wrapper script.What was not tested
--cpunodebind=1alone hurts on a PC whose GPU is on node 0 (the mirror case).nr_hugepages=0) on a PC that actually needs MAP_HUGETLB.🤖 Generated with Claude Code
@MrKop-git commented on GitHub (Oct 15, 2026):
Update: the official
--calibrateconfirms the NUMA-local setup, and the engine picks different optimal settings under it.After binding to node 1, the calibration chose:
The direction makes sense: with the CPU expert pool now on local DDR4 (68 GB/s instead of ~19 GB/s over UPI), the CPU computes missed experts faster, so the engine wants the GPU to take a smaller PCIe share (0.32 → 0.20) and the drafter to propose only high-confidence tokens (0.50 → 0.70). The NUMA change didn't just speed things up — it moved the optimal operating point.
Full calibration log excerpt:
🤖 Generated with Claude Code
@MrKop-git commented on GitHub (Oct 15, 2026):
A related lever on this same machine, measured under this issue's node-1 binding: the opt-in
STRATA_DENSE_F32=1(#2178) was A/B'd on the 1080 Ti with cuBLAS 12.8.4.1 —gemm_f32_paritybitwise (5,201 sizes), 7K prompt 341 -> 375 tok/s, 565-token prompt 240 -> 257 tok/s, decode unchanged. Report in #2695.@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.