Avatar of kam_uk
kam_uk
 asked on

Over-allocating memory for VM guests

Hi

I had a query on VMWare ESX 3.5 I was hoping someone could help me with. The questions surrounds memory usage.

Let's say the ESX host has 16GB RAM.

I have four guests running on it, each with 4GB RAM assigned. Technically, this should be fine I understand, because the servers won't always be using 4GB RAM, and even if they did, then we are covered.

Now, let's say I added another guest with 4GB RAM. Even if we don't expect the all servers to use their full memory allocation at the same time, can this still cause performance degradation to the host (and therefore other guests)?

In general, what are people's recommendations in terms of allocated RAM v physical RAM?
VMware

Avatar of undefined
Last Comment
vmwarun - Arun

8/22/2022 - Mon
robdcoy

Memory management in VMware is much better than other products such as HyperV.  You are correct, you should run into problems.  I have about 20 VM's running on a host with 32GB of RAM.  Each of these machines have more than1.5GB allocated to them.

The only time I run into even a little problem is during backups.  I do host based backup, and depeding on the timing, it does get a little close to the limit of 32GB, BUT that is a night and no one is working anyway.  :o)
ASKER CERTIFIED SOLUTION
robdcoy

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
printnix63

SOLUTION
robdcoy

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
bgoering

VMware has a number of memory management techniques that allow you to overcommit physical RAM while experiencing little or no impact to performance. In ESX(i) 3.5 the two main techniques are Transparent Page Sharing (TPS) and Memory Ballooning.

TPS works well when many of your guests are basically running the same OS, service pack, and patch levels - say Windows Server 2003. The idea is that many of resident memory pages contain identicle code, and VMware only has to maintain a single copy of the page in physical RAM that is shared by all of the similar virtual machines. Same holds true for several Linux, or other OS types.

Memory ballooning requires VMware tools to be installed into your guest virtual machiens. The idea is from within the guest the memory driver in VMware tools understands better the needs of the virtual machine, and is unable to release little used memory pages to ESX to be better utilized elsewhere.

So far a a general rule of thumb that is hard to define. As you can see it depends greatly on how similar your workloads within the VMs are. What you can do is from within the VI Client look at the performance tab, select the memory counters from the dropdown. Whenever you see the "Swap" counter come off of zero that is the point where you may begin to experience some performance impact.

Hope this helps
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
bgoering

I should proofread - make that "and is ABLE to release little used memory pages..."
robdcoy

All in the PDF link I posted but bgoering said it much better than I did.  I would even say he put it better than VMware!  Hahaha
vmwarun - Arun

Whenever you consider RAM in the virtual world, you also have to take overhead into consideration. The VMKernel needs some memory to manage the VMs which it considers as worlds, each VM runs within its own process and the VMKernel manages the same.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.