3

I have a VMWare ESXi Cluster and I'm trying to get my head around memory consumption on ESXi. My physical server has 48GB of memory. The host is running one VM which has been allocated 12GB RAM with no reservation -

VM resource allocation screenshot

So now as a result of this my ESXi hosts consumed memory is sitting at about 14GB - 12GB for the VM (I assume) + 2GB running processes etc.

ESXi memory consumption

If I was to run out of consumed memory, would the ESXi start running into faults or is it only if I run out of active memory? Technically I would like to overallocate so that if I had to take a node out of the loop for maintenance, I can put 4 VM's that have 12GB allocations - even though those VM's aren't actually consuming all of that memory and only for a short period of time. All VM's are running Linux/CentOS or Ubuntu.

I hope this makes sense!

Chris
  • 1,269
  • 2
  • 17
  • 34

2 Answers2

5

You can safely overcommit without fear of faults: to an extent

See: https://labs.vmware.com/vmtj/memory-overcommitment-in-the-esx-server

VMware has a number of memory reduction options available and will employ those methods in the event of resource contention.

Memory sharing, compression, ballooning and swap are used to try to keep your virtual machines active.

enter image description here

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • That's an odd table in that it suggest ESXi doesn't allow for hot-add of memory, which is does, when it actually means it doesn't have to use it to deal with host memory issues. – Chopper3 Apr 18 '17 at 13:00
  • Thanks for this, so long story short overcommitment is OK to an extent. It just surprised me how much a VM consumes on an ESXi host. I'd imagine it would have consumed what was required at that time (say active was 3GB, it'd only consume 3GB) but seems that isn't the case. – Chris Apr 18 '17 at 14:40
  • @Chris: It depends on how much free memory the host has, it looks like you still have plenty of memory to spare, so there's no need to take any action. Therefore, the hypervisor just assigns all the memory to the VM until you add another one. Then it may start applying various overprovisioning techniques depending on the severity of the memory shortage. – JohnEye Apr 18 '17 at 15:37
3

If I was to run out of consumed memory, would the ESXi start running into faults or is it only if I run out of active memory?

Not faults no, it'll swap to disk and your performance will plummet but no it won't fault as such.

That said, memory is cheap right now, always try to have enough in your hosts so they don't have to swap - or use NVMe (or regular SSD) to swap to if you must.

Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • In our standard use case we'd have more than enough. Just in maintenance periods memory becomes tight. Memory is cheap but licensing for memory according to our provider is not! Thanks for your feedback. – Chris Apr 18 '17 at 14:21