All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Shirshov <ru.pchel@gmail.com>, kvm@vger.kernel.org
Subject: Re: 2 times more VMs withOUT KVM
Date: Fri, 31 Jul 2015 09:54:11 +0200	[thread overview]
Message-ID: <55BB29A3.4000802@redhat.com> (raw)
In-Reply-To: <CAG+TGLObZCJZkqEXVEfGGz4nNNHjX-TFNHrP_q8=uM83PM0sNg@mail.gmail.com>



On 31/07/2015 01:08, Pavel Shirshov wrote:
> Hello,
> 
> Today I was very surprised to see that KVM with enabled HugePages uses
> much more memory versus KVM without HugePages enabled.
> 
> I have a server with 386Gb memory.
> I have a VM image which allocate up to 3.2Gb memory (libvirt <memory/> tag).
> 
> Without HugePages enabled on the server I can create up to 235 VM on the server.
> 
> With HugePages enabled I can create about 105 VMs on the same server.
> I reserve 180000 2Mb pages on the server.
> 
> I see that 180000*2Mb / 3.2 Gb = 112.5 VMs.
> 
> How KVM without HugePages is able to create 235 VMs? Does KSM help?

KVM without hugepages can overcommit.  It can do this thanks to unused
memory (never touched by the VM, thus all zero), swapping out,
deduplication (KSM), ballooning or a combination of the four.

Hugepages are never overcommitted.

Paolo

> Is it possible to tune KVM with HugePages up to support ~200 VMs?
> 
> Thanks

  reply	other threads:[~2015-07-31  7:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 23:08 2 times more VMs withOUT KVM Pavel Shirshov
2015-07-31  7:54 ` Paolo Bonzini [this message]
2015-07-31 18:18   ` Pavel Shirshov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55BB29A3.4000802@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=ru.pchel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.