为系统守护进程预留计算资源
Reserve Compute Resources for System Daemons
为系统守护进程预留计算资源
看了一下代码,CPU设置不对的话, 其实不用重新安装openness .
# git grep reserved_cpus
只给 reservedSystemCPUs 使用了。
https://kubernetes.io/zh/docs/tasks/administer-cluster/reserve-compute-resources/
EXPECTID=0
HT_SIBLINGS=`cat /sys/devices/system/cpu/cpu$EXPECTID/topology/thread_siblings_list` # 0,8
CORE_SIBLINGS=`cat /sys/devices/system/cpu/cpu$EXPECTID/topology/core_siblings_list` # 0-15
RESERVED=$HT_SIBLINGS
[[ ! $HT_SIBLINGS =~ "," ]] && RESERVED=${CORE_SIBLINGS//-/,}
sed -i -e 's/reservedSystemCPUs:.*/reservedSystemCPUs: '"$RESERVED"'/' /var/lib/kubelet/config.yaml
sed -i -e 's/reserved_cpus:.*/reserved_cpus: "'"$RESERVED"'"/' flavors/sdewan-hub/all.yml
systemctl status kubelet
systemctl restart kubelet
这样就可以了。