Question regarding vCPU for KVM

ca_maer

Well-Known Member
Dec 5, 2017
181
14
58
45
We are looking to enable hotplug for the CPU for KVM guests. I've seen that it's only possible with vCPU and not Sockets nor Cores.
Assuming the host has 32 cores, would it be best practice to set
Sockets: 2
Cores: 16
and set the vCPU to 6 or according to the guest CPU need.

If I understand correctly the host should spread the load of the guest on all the CPU of the host but limit it to 6 CPU usage ? Is there another way I should approach this ?

Thanks
 
We are looking to enable hotplug for the CPU for KVM guests. I've seen that it's only possible with vCPU and not Sockets nor Cores.
Assuming the host has 32 cores, would it be best practice to set
Sockets: 2
Cores: 16
and set the vCPU to 6 or according to the guest CPU need.

If I understand correctly the host should spread the load of the guest on all the CPU of the host but limit it to 6 CPU usage ? Is there another way I should approach this ?

Thanks
no, the vcpus are mapped to physical cores. (if you have 6 vcpus, the load will be spread to 6 cores).

you need to use "cpu limit:6" option , with 32cores if you want to spread the load to all cores, but limit usage.
 
no, the vcpus are mapped to physical cores. (if you have 6 vcpus, the load will be spread to 6 cores).

you need to use "cpu limit:6" option , with 32cores if you want to spread the load to all cores, but limit usage.
Got it. Is there an issue if I always set the sockets and cores the max amount of the host and only use the cpu limit to limit the guest ?