SMT and NUMA for Containers

cyruspy

Renowned Member
Jul 2, 2013
121
9
83
Hello!,

I have a testing environment that's running different workloads.

I need to setup a container with particular requirements:
- Disable SMT
- assign cores from NUMA node 1 (second CPU)
- align memory assignment to memory directly connected to NUMA node 1

Given other workloads run on the node, I don't want to disable SMT on the hardware side. The ask would be to dedicate resources in NUMA 1 to the mentioned container and leave NUMA 0 for administrative tasks (including Ceph, FRR/networking processing) and virtual machines

Would it be possible to setup a container with the configuration tools available via PVE for containers?
 
Would it be possible to setup a container with the configuration tools available via PVE for containers?
I don't know if there is some cgroup magic that does that, but you can at least for the CPU core part pin processes to a core, but those cores are presented by the hypervisor kernel, so if that uses SMT, your container will too and vice versa. I don't know if you can restrict the NUMA node in memory allocations. The whole virtual memory space works very hard to abstract everything.

The last two steps can be achieved by using a VM and pin it to a subset of cores and a NUMA node, if you really want to hardcode this.