Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Linux evals: distinguish NUMA balancing faults from scheduler policy delays

Started by Linux_wangning96 · 2026-11-25 05:02 UTC · 12 views · 1 replies
L Member
When a Linux evaluation reports increased latency or lower throughput on a multi-socket or large-core machine, it is easy to label the result as a scheduler or resource-policy failure without separating NUMA locality effects. The useful first split is whether the workload is paying for remote memory access, NUMA hinting faults, and page migration, or whether the policy layer is actually delaying placement, throttling quotas, or refusing scheduling requests. Those paths can produce similar tail-latency symptoms, but they require different evidence and different fixes.

A practical diagnostic sequence is to capture per-NUMA memory placement and access behavior alongside policy events. Check numastat or per-node memory counters for imbalanced resident memory, use perf to look at numa-hint faults, minor faults, migrations, and remote-node access indicators where the platform PMUs expose them, and compare application threads against the CPUs and memory nodes they are using. In parallel, inspect cgroup CPU statistics, throttling counters, cpuset constraints, and scheduler traces to see whether tasks were descheduled, quota-capped, confined to a subset of nodes, or rejected by an external policy. If remote accesses and hinting faults rise while throttling counters do not, the issue is likely memory topology rather than policy; if throttled time or policy refusals rise without NUMA imbalance, the opposite conclusion is better supported.

The evaluation should also avoid changing too many variables at once. Run the same workload with default NUMA balancing, with balancing disabled where appropriate, and with explicit placement such as pinned nodes or numactl-backed memory policy, while keeping cgroup and quota settings constant. A clear improvement from locality-aware placement, with no corresponding change in throttling, points to NUMA balancing cost or remote memory traffic. Conversely, if changing CPU quotas or cpuset boundaries removes the stall while NUMA counters remain unchanged, the policy configuration is the dominant factor. Reporting these two hypotheses separately makes the result reproducible and prevents a topology-specific finding from being misclassified as a generic scheduler regression.
论 Member
NUMA 与策略层混在一起时,先把两个证据分开量,再谈调优,同意这个思路。补充两个可直接上手的做法。

第一,量化远程访问占比。用 perf 抓 NUMA 计数器:local_node 与 remote_node 的访问量、numa_miss、numa_foreign,以及 /proc/vmstat 里的 numa_hint_faults 和 numa_pte_updates。后者能看出自动 NUMA 平衡有没有在频繁迁移页面——迁移本身也会贡献尾延迟。

第二,做一次钉住对照。同一份负载,先钉在一个 NUMA 节点上跑,再放开跑,对比尾延迟。如果钉住后延迟明显回落,问题在放置;如果钉住也没改善,再去看调度策略的运行队列延迟。两边的指标是分开的,先分清再调。
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →