CPU Overcommitting question
Dear KVM community people,
we are running on a kvm hypervisor with the following configuration:
CPU : Dual socket 6 cores: Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz RAM : 48 GB
OS: CentOS release 6.5
2 very cpu intensive virtual machines and we are trying to find the best way to optimize the available resources.
In particular what we would like to understand is how many vCPUs can be assigned to each VM, in order to possibly exploit the overcommitting features of the virtualization without degrading the performances.
The first question is about hyperthreading: should it be enabled and the virtual cores be considered?
The second quesion is about the way to assign vCPUs between the two VMs.
Let's suppose we do not enable the hyperthreading, in our understanding we have the following options:
1) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) = total number of physical cores (12) (both VMs have < 12 vCPUs) (ie. 8+4)
2) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (both VMs have <= 12 vCPUs) (ie. 12+8)
3) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (one VM has > 12 vCPUs) (ie. 16+8)
4) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (both VMs have > 12 vCPUs) (ie. 16+16)
According to your experience which would be the best one?
Thank you very much.
Kind Regards.
B. Riccardo
Paolo Bonzini
maintainerIl 18/07/2014 15:06, Riccardo Brunetti ha scritto:
Quoted 10 lines
1) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) = total number of physical cores (12) (both VMs have < 12 vCPUs) (ie. 8+4)
2) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (both VMs have <= 12 vCPUs) (ie. 12+8)
3) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (one VM has > 12 vCPUs) (ie. 16+8)
4) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (both VMs have > 12 vCPUs) (ie. 16+16)
The last two are usually bad ideas. The first two should be okay. Overcommitting works best if the VM are I/O bound (disk or network).
If you're overcommitting, hyperthreading should in general be enabled.
Answers for very specific scenarios are hard to give though, so you should also benchmark your deployment with realistic workloads.
Paolo
Hi Paolo, thanks for the prompt reply.
Quoted 12 lines · Paolo Bonzini
Il 18/07/2014 15:06, Riccardo Brunetti ha scritto:
Quoted 10 lines
1) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) = total number of physical cores (12) (both VMs have < 12 vCPUs) (ie. 8+4)
2) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (both VMs have <= 12 vCPUs) (ie. 12+8)
3) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (one VM has > 12 vCPUs) (ie. 16+8)
4) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of physical cores (12) (both VMs have > 12 vCPUs) (ie. 16+16)
Quoted 5 lines
The last two are usually bad ideas. The first two should be okay. Overcommitting works best if the VM are I/O bound (disk or network).
If you're overcommitting, hyperthreading should in general be enabled.
So, it should be ok to have the first two options, but also considering that with hyperthreading instead of 12 cores we can consider 24? Thus we can go with:
1) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) = total number of cores (24) (both VMs have < 24 vCPUs) (ie. 18+6)
2) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of cores (24) (both VMs have <= 24 vCPUs) (ie. 24+10)
Quoted 2 lines
Answers for very specific scenarios are hard to give though, so you should also benchmark your deployment with realistic workloads.
Yes, I understand.
Quoted 2 lines
Paolo
Riccardo
Il 18/07/2014 18:49, [email protected] ha scritto:
Quoted 8 lines
So, it should be ok to have the first two options, but also considering that with hyperthreading instead of 12 cores we can consider 24? Thus we can go with:
1) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) = total number of cores
(24) (both VMs have < 24 vCPUs) (ie. 18+6)
2) Assign vCPUs so that vCPU(VM1) + vCPU(VM2) > total number of cores
(24) (both VMs have <= 24 vCPUs) (ie. 24+10)
Yes.
Something between 12 and 24 will probably give the best performance.
Paolo