3

I am currently running VMware vSphere 5 on a server I use for various projects. Mainly I use it for honing my skills with administration and running a few game servers.

Recently I was considering a move to Xen (xen.org) or possibly Citrix XenServer (Free version).

When I was looking at the various features not included in XenServer I noticed that one feature not included was memory overcommit. To my limited knowledge this was / is on VMware vSphere. The problem is since I was using VMware in a small environment (1 server) I am not even sure if I was utilizing memory overcommit.

So I am wondering partially what it is (memory overcommit) and how do I know if I was utilizing it or not?

TheCleaner
  • 32,352
  • 26
  • 126
  • 188
ianc1215
  • 1,965
  • 7
  • 34
  • 55

3 Answers3

1

Memory over commitment means allowing running virtual machines to have more assigned RAM (in total) than the physical host actually has.

So, add up the RAM in your VM's that you want to run at the same time, then allow some room for the hypervisor and if the total is less than the physical RAM you're not over committing.

Dan
  • 15,280
  • 1
  • 35
  • 67
  • 1
    And it's a feature you should avoid as it's going to be slow. To my knowledge, xen doesn't support it. – hookenz Apr 23 '13 at 21:43
  • @Matt Xen has supported memory ballooning for years, since about [version 3.3](http://blog.xen.org/index.php/2008/08/27/xen-33-feature-memory-overcommit/) or so. – Michael Hampton Apr 23 '13 at 21:48
  • Well that's surprisingly simple to explain. I have always partitioned my memory so I only use exactly what I have available. – ianc1215 Apr 23 '13 at 21:54
  • http://blog.xen.org/index.php/2008/08/27/xen-33-feature-memory-overcommit/ – hookenz Apr 23 '13 at 21:55
  • @Matt Er, that's exactly the link I just gave you! – Michael Hampton Apr 23 '13 at 21:57
  • Michel, I hadn't realised you could "overcommit" with the balloon driver. I've always found it better to turn it off and minimise dom0 memory. Then let the Guest OS do it's own virtual memory. The ballooning feature is SLOW. – hookenz Apr 23 '13 at 21:57
  • Michael, sorry I didn't notice that was a link :) – hookenz Apr 23 '13 at 21:57
  • You know despite what the documentation says, I sure you can't overcommit. I'll have to try that now. – hookenz Apr 23 '13 at 22:01
  • @Matt to my knowledge overcomittment is not possible up to 4.x. And what is described in 3.3 does not match the definition of overcommittment from Dan. – Nils Apr 24 '13 at 09:13
  • @MichaelHampton What is described in the 3.3-link is more like "dynamic RAM allocation" - it is not overcomittment, since the sum of the allocated memory does never exceed the physical RAM. – Nils Apr 24 '13 at 09:14
0

In VMware ESX and ESXi if you install VMware Tools, those will enable the memory management driver aka balloon driver.

Another mechanism to allow memory over-commitment is the swapping/paging at the ESX/ESXi level, but this is extremely slow and you should avoid it.

In ESXi 5 besides this, there are another 2 mechanisms to enable memory over-commitment. One is memory de-duplication, where segments of memory that are identical will be allocated only once. There is a vmkernel thread that will scan the memory in the idle time to find such segments.

The other mechanism is memory compression. Instead of swapping, the server will make some room by compressing some memory.

To know if you are using, add the memory allocated for all VMs, including the ESXi console, add about 100MB (this is not accurate) for the vmkernel . If this is grater than physical memory, then you are over-committing the memory.

You can also check for balloon size and for swap used for each VM in the performance counters of the ESXi server.

Mircea Vutcovici
  • 16,706
  • 4
  • 52
  • 80
  • I think that XEN has some similar mechanisms for memory management. – Mircea Vutcovici Apr 23 '13 at 21:40
  • Balloooning is not overcommittment. To be able to overcommit there has to be an additional abstraction layer for the memory-access (like in Hyper-V). IMHO there is nothing like that in XEN up until 4.1 (I do not know about newer versions). – Nils Apr 24 '13 at 09:16
  • Ballooning is used as a mechanism for memory overcommitment. It is allocating memory inside a VM, memory that will be reused for another VM. – Mircea Vutcovici Apr 24 '13 at 13:37
  • So VMWare does not strictly overcommit, too? – Nils Apr 25 '13 at 14:49
  • What do you mean by "strictly overcommit"? – Mircea Vutcovici Apr 25 '13 at 17:01
  • See the defintion from Dan's answer. Overcommittment is a state where the sum of the allocated RAM exceeds the total phyiscal RAM. Ballooning deallocates RAM and thus the sum does never exceed the total physical RAM. – Nils Apr 26 '13 at 10:31
0

Xen does have dynamic memory management techinques, namely ballooning and self-ballooning.

It does not support memory overcommit, in that it does not allow VMs to actually use more memory than what you have physically available in your system.

Said another way: with Xen you have to physically partition your RAM between VMs, but you can still dynamically adjust those partitions at runtime without rebooting VMs.

VMware vSphere Hypervisor, on the other hand, can also give your VMs more ram than you physically have, by swapping it out to disk if it can't get enough real ram (by ballooning other VMs or the like).

PS, as a side note, Xen also has a completely different technology in Trascendent Memory: VMs supporting it (Linux >= 3.0 AFAIK) can use it for various purposes (mainly as page cache, reducing IOPS to actual disks).

Luke404
  • 5,708
  • 3
  • 44
  • 58