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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html