mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1900] NUMA-aware placement: keep hot pools on the GPU's node, let cold pools (expert file tail, conversation caches) use the other socket — opt-in #750
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#750
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 @G0-0000 on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1900
On dual-socket machines, memory on the other CPU socket is roughly 2x the latency away (QPI/UPI), and this engine currently has no NUMA-aware placement: the recommended practice is to pin the whole process to the GPU's node by hand (systemd
CPUAffinity+NUMAPolicy=bind/NUMAMask, ornumactl). Two references: #674 measured engine-wide binding to the GPU node at about +5% over default; #1300 notes there is no supported way to confine the pool to one NUMA node.That works, but it throws away the other socket's RAM: on machines where both sockets have plenty of memory, cold data (the expert file tail not held in VRAM/RAM, conversation-cache snapshots) must live in the GPU node's RAM or be re-read from disk, while the second node sits idle.
Suggestion (opt-in, default behavior unchanged — the shape is the maintainers' call):
automode: read the topology at startup; keep hot pools (resident expert complement, KV streaming buffers, embeddings) on the GPU's node, and place cold pools on another node when it has free memory. In either case, honoring the rule that a new feature is opt-in and the default path stays byte-identical.Or, if a maintainer would rather settle on the design, we can write the implementation — happy to prepare the PR once the shape (flag naming, scope, semantics) is decided.
Why it could help:
Not proposed, to preempt confusion:
Implementation notes (for whoever picks this up):
numa_balancingcan disturb static placement.Measured on: 2-socket Xeon E5 v4 (~94 GB total; 64 GB attached to the GPU's socket), Tesla V100-32G, Flash-Next UD-IQ4_XS, v0.1.42 — hot pools: 27 GiB resident experts + 1.55 GiB KV host buffers + 644 MiB embeddings; cold candidates: ≈4.4 GiB expert tail + 4 GiB conversation caches; other socket ~10 GiB reclaimable.
@MrKop-git commented on GitHub (Oct 15, 2026):
Measured data point supporting this: +37-40% prompt throughput from external numactl binding on a dual-socket PC.
We measured the simple approach this issue describes as "pin the whole process to the GPU's node" on a GTX 1080 Ti + 2x Xeon E5-2696 v4 (Broadwell-EP, no AVX-512, PCIe Gen3 x16, GPU on NUMA node 1):
Results (same
tools/strata_bench.pysuite, 3 runs, before vs after, full data in #2684):Decode was unchanged (23.6 → 21.5 tok/s, within noise) — the CPU expert pool is bandwidth-bound and locality helped prompts (sequential reads) more than decode (per-token expert reads are already fast enough locally).
This is much larger than the +5% from #674. The difference is likely because our card only fits 1,513 of 24,576 experts in VRAM (6%), so 58-84% of routed experts are computed on the CPU pool — memory locality on the CPU side dominates. On a card that holds most experts in VRAM, the CPU-side NUMA penalty matters less.
Relevance to this proposal: the whole-process binding we measured has the limitation you describe — it confines everything to one node and wastes the other socket's RAM. Your engine-level split (hot pools on the GPU node, cold pools on the other socket) would capture the same locality win for the hot path while freeing the second node's RAM for the file tail and conversation caches. The 37-40% number here is a strong argument for making that split a first-class feature.
One additional data point: after NUMA binding, the official
--calibratemoved the optimal settings — pcie-frac 0.32 → 0.20 and spec-min-p 0.50 → 0.70 (the CPU computes missed experts faster on local DDR4, so the engine wants a smaller GPU PCIe share and only high-confidence drafts). A NUMA-aware engine could re-calibrate these automatically.🤖 Generated with Claude Code
@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.