kubernetes cpumanager and hyperthreading

6/4/2020

we are trying to understand the allocation pattern of cpu manager plugin in kubernetes. we are using cpumanager with hyperthreading and single numa node topology and static cpu manager policy. for single POD in system, the cpu manager allocates cpus : 4,6,8,10,12,40,44,46,48,50,52 our expectation was : 4,6,8,10,12,14,16,18,20,22,24. is there any thing missing in our configuration ?? we want to achieve the cpus to be consecutive on the same numa node. please advise.

commands inside pod 
root@pod-2:~# cat /proc/1/status | grep allowed 
Cpus_allowed:	0000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00155100,00001550
Cpus_allowed_list:	4,6,8,10,12,40,44,46,48,50,52
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003
Mems_allowed_list:	0-1

commands on node
[root@master ~]# lscpu  |grep NUMA 
NUMA node(s):          2
NUMA node0 CPU(s):     0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78
NUMA node1 CPU(s):     1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79
[root@master ~]# cat /etc/sysconfig/kubelet 
KUBELET_EXTRA_ARGS=--reserved-cpus=0-3 --feature-gates=TopologyManager=true --topology-manager-policy=single-numa-node --cpu-manager-policy=static
-- Ravikumar Tulugu
kubernetes

0 Answers