TECHNOLOGY

Read the allowed NUMA memory nodes inside a container

In this article
THE QUICK TAKE

Read the effective memory-node allowance before NUMA policy, and keep allowed nodes distinct from existing page placement.

A serving container requests a memory policy near its GPU, but that NUMA node is outside its administrative allowance. Linux memory policy and cpuset eligibility are different layers. Inspect the effective memory-node mask before interpreting a requested bind policy or comparing local and remote host-buffer behavior.

Locate the real hierarchy

Resolve the target process’s actual cgroup through the authorized host view. A cgroup namespace can hide ancestors from the container’s path. Record the process identity, current placement and observation time. Reading a similarly named group from a deployment file is insufficient if the runtime moved or recreated the worker beneath another hierarchy.

Compare requested and effective nodes

In a cpuset-enabled unified hierarchy, cpuset.mems describes the requested nodes while cpuset.mems.effective exposes nodes actually granted. An empty requested value can inherit an ancestor’s setting rather than mean no memory is allowed. Parent constraints and online node state affect the effective result. Keep both observations instead of translating a blank file into a capacity failure.

Apply policy inside the allowance

The kernel documents that cpuset restrictions take precedence over a task’s NUMA policy. A process cannot establish access to an administratively excluded memory node simply by requesting it through a policy tool. Inspect the actual operation’s return or resulting policy. Do not infer that a successful-looking launch command achieved the intended memory-node selection.

Distinguish permission from location

Mems_allowed_list describes allowed nodes, not a histogram of existing pages. A policy change and existing residency are also separate observations. Node-mask changes can involve documented migration behavior with limits and cost. Avoid editing a running group as a diagnostic shortcut; first determine whether the intended node is eligible and where the relevant pages were actually allocated.

Verify a constrained allocation

Use a disposable process with a known allowed subset and a small fresh allocation. Compare the effective mask, requested policy and observed placement through supported diagnostics. Acceptance means the policy is interpreted within the administrative boundary. It does not establish GPU locality, relocate every existing page, measure transfer bandwidth or justify broadening the container’s access to other memory nodes.

Primary references

Linux Control Group v2.

Linux NUMA Memory Policy.

Process Status.

Related reading: First touch and NUMA: locating GPU host buffers; NUMA in GPU servers: why resource placement matters.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles