* 2 times more VMs withOUT KVM
@ 2015-07-30 23:08 Pavel Shirshov
2015-07-31 7:54 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Shirshov @ 2015-07-30 23:08 UTC (permalink / raw)
To: kvm
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?
Is it possible to tune KVM with HugePages up to support ~200 VMs?
Thanks
--
With best regards, Pavel S. Shirshov
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2 times more VMs withOUT KVM
2015-07-30 23:08 2 times more VMs withOUT KVM Pavel Shirshov
@ 2015-07-31 7:54 ` Paolo Bonzini
2015-07-31 18:18 ` Pavel Shirshov
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2015-07-31 7:54 UTC (permalink / raw)
To: Pavel Shirshov, kvm
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 2 times more VMs withOUT KVM
2015-07-31 7:54 ` Paolo Bonzini
@ 2015-07-31 18:18 ` Pavel Shirshov
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Shirshov @ 2015-07-31 18:18 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: kvm
Hi Paolo,
Thank you for the answer. I suspect that overcommit thing. In my case
it's a combination of unused memory and KSM.
So hugepages are not so useful as I saw in the presentations. I think
it works just for some usecases.
Thanks
On Fri, Jul 31, 2015 at 12:54 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> 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
--
With best regards, Pavel S. Shirshov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-31 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 23:08 2 times more VMs withOUT KVM Pavel Shirshov
2015-07-31 7:54 ` Paolo Bonzini
2015-07-31 18:18 ` Pavel Shirshov
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.