public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* CPU Overcommitting question
@ 2014-07-18 13:06 Riccardo Brunetti
  2014-07-18 15:30 ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Riccardo Brunetti @ 2014-07-18 13:06 UTC (permalink / raw)
  To: kvm

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CPU Overcommitting question
  2014-07-18 13:06 CPU Overcommitting question Riccardo Brunetti
@ 2014-07-18 15:30 ` Paolo Bonzini
  2014-07-18 16:49   ` riccardo.brunetti
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2014-07-18 15:30 UTC (permalink / raw)
  To: Riccardo Brunetti, kvm

Il 18/07/2014 15:06, Riccardo Brunetti ha scritto:
> 
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CPU Overcommitting question
  2014-07-18 15:30 ` Paolo Bonzini
@ 2014-07-18 16:49   ` riccardo.brunetti
  2014-07-18 21:30     ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: riccardo.brunetti @ 2014-07-18 16:49 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, Paolo Bonzini


Hi Paolo, thanks for the prompt reply.

On 2014-07-18 17:30, Paolo Bonzini wrote:
> Il 18/07/2014 15:06, Riccardo Brunetti ha scritto:
>> 
>> 
>> 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.
> 

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)

> Answers for very specific scenarios are hard to give though, so you
> should also benchmark your deployment with realistic workloads.

Yes, I understand.

> 
> Paolo

Riccardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CPU Overcommitting question
  2014-07-18 16:49   ` riccardo.brunetti
@ 2014-07-18 21:30     ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-07-18 21:30 UTC (permalink / raw)
  To: riccardo.brunetti, Paolo Bonzini; +Cc: kvm, Paolo Bonzini

Il 18/07/2014 18:49, riccardo.brunetti@dnshosting.it ha scritto:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-18 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 13:06 CPU Overcommitting question Riccardo Brunetti
2014-07-18 15:30 ` Paolo Bonzini
2014-07-18 16:49   ` riccardo.brunetti
2014-07-18 21:30     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox