[rhelv6-list] Minimal RAM for a RHEL6 KVM host?

Phil Meyer pmeyer at themeyerfarm.com
Thu Feb 3 18:09:46 UTC 2011


On 02/03/2011 10:26 AM, carlopmart wrote:
> On 02/03/2011 06:08 PM, Phil Meyer wrote:
>> On 02/03/2011 09:00 AM, carlopmart wrote:
>>> Hi all,
>>>
>>> Which is the minmal amount of RAM needed for a RHEL6 KVM host?? I 
>>> read RedHat's
>>> docs about this, and it seems 2GB ... Really??
>>>
>>> Is it possible to limit RAM used by the KVM host as a Xen does??
>>>
>>> Thanks.
>>
>> Xen dom0 is a tiny, raw hypervisor using bits of the Linux kernel to 
>> operate hardware.
>>
>> KVM is a kernel module based hypervisor. Thus it uses the full kernel 
>> and OS with
>> all that implies.
>>
>> VMs utilizing the KVM hypervisor run as applications in the host 
>> application space.
>> This is totally different than Xen.
>>
>> It has great advantages, and a few disadvantages.
>>
>> Using KVM, you have to think of the VMs as fixed sized applications.
>>
>> Want to run 2 4GB KVM VMs? The host needs to have more than 8GB 
>> available to it in
>> order to dedicate RAM to the VMs as well as manage its own resources.
>>
>> I am bending the specifics slightly to make the point that KVM based 
>> VMs run on top
>> of a full kernel/OS, and that KVM VMs are treated as applications 
>> within that space.
>>
>> Hope this helps.
>>
>> Good Luck!
>>
>
> Thanks Phil. I will run minimal services on host side (ntp, postfix 
> and kvm). In the example that you explain, does enough with the host 
> had, for example, 8.5 GB of RAM?
>
> I don't need HA or Clustering services or to connect to external 
> storage (I will use local disks).
>
> Thanks.
>
>

Here is a real scenario:

I have a well equipped server with 32GB RAM installed.

I installed RHEL6 with kvm, libvirt, virt-manager, ksm, etc.

I have personally created 60 KVM based VMs running Fedora 14 set to 
512MB RAM each on this system.

They all functioned within specifications for the hardware they were 
running on.

The host computer showed almost exactly 30GB used by the guests under 
load, and as low as 17GB when all 60 were initially booted and idle.

Therefore, I can conclude that a 32GB system can manage up to 60 512MB 
KVM based VMs.

I/O for those guests is another matter entirely! :)

You will drive the host crazy unless you turn of cache for the VMs, and 
use some kind of fast storage array for all those clients.

But that is another plus of using a real host based hypervisor.

In this same scenario I could run 4 2GB KVM based VMs, for example, and 
leave disk cacheing on in the config.  This way the host will use its 
large memory reserve of 24GB as mostly disk cache for my VMs.  This can 
produce results of over 500MB/sec reads in bonnie++ inside the VMs!

Dangerous, but fun!

Using the host as a disk cache for the VMs can cause a lot of issues on 
a crash, and prevents live migration of the VM, but man, the VMs disk 
i/o screams!

Good Luck!




More information about the rhelv6-list mailing list