分类: 虚拟化
2021-01-12 08:26:56
在flavor里设置cpu绑定
nova flavor-key FLAVOR-NAME set \
hw:cpu_sockets=FLAVOR-SOCKETS \
hw:cpu_cores=FLAVOR-CORES \
hw:cpu_threads=FLAVOR-THREADOCKETS \
hw:cpu_max_sockets=FLAVOR-SOCKETS\
hw:cpu_max_cores=FLAVOR-CORES \
hw:cpu_max_threads=FLAVOR-THREAD
hw:numa_nodes=1 限制vcpu分配在一个numa上 一下是两个numa的分配配置
$ openstack flavor set m1.large --property hw:numa_nodes=2 $ openstack flavor set m1.large \ # configure guest node 0 --property hw:numa_cpus.0=0,1 \ --property hw:numa_mem.0=2048 $ openstack flavor set m1.large \ # configure guest node 1 --property hw:numa_cpus.1=2,3,4,5 \ --property hw:numa_mem.1=4096
设置cpu实时性
hw:cpu_realtime=yes
hw:cpu_realtime_mask=^0-1
hw:hypervclock=yes