VMware Cloud Community
mark_a_k
Contributor
Contributor
Jump to solution

how much physical memory required?

I have an esx 3.02 server with 16gb of ram. How many virtual machines can i run on this server when i have 16gb of ram if each server has between 1gb and 2gb of ram. From what i can see the esx server appears to use 1gb of physical ram for each VM that uses 1gb of physical Ram. I added up the amount of RAM assigned to our VMs and this matched the amount of RAM that was reported as in use by the ESX server. We have 5 VMs assigend 2gb and 3VMs assigend 1gb of RAM. ESX reported 13gb ram in use. Does this mean that my total VM ram should not exceed my physical RAM?

0 Kudos
1 Solution

Accepted Solutions
Texiwill
Leadership
Leadership
Jump to solution

Hello,

In general you do not want to overcommit memory (allocate out more than you have available), in addition, you do not to assign to VMs more memory than they need. So the number of VMs depends on the amount of physical memory - 1 GB (used by SC and vmkernel) and how much memory each individual VM uses (not allocated). If your memory allocation is close to what is being used, you can determine exactly how many VMs you can place on the machine.

However, if for example you allocate 1 GB to each VM, you are thereby allowing the VM to use the complete 1GB. If there is a process that goes bad and runs out of control it can use all available memory. Thereby you would be limited to 15 VMs in this case. Limiting memory by VM is the better choice as you can get more VM per node. So take careful measurements of necessary memory and reduce VMs to close to that size if you feel that you can otherwise you can trust the balloon driver (if your VM supports it) or overcommit memory which produces bad performing VMs.

You need to balance real measurable needs vs what the VM could maximally use.

Best regards,

Edward L. Haletky, author of the forthcoming 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', publishing January 2008, (c) 2008 Pearson Education.

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill

View solution in original post

0 Kudos
4 Replies
cemetric
Enthusiast
Enthusiast
Jump to solution

There's no fast answer here ... It all depends on how you configure your ESX environment (eg: Resource Management).

If you configure the Virtual Machines with the memory they need, then it is possible to configure more VM's/memory then you have physical memory available (overcommitment), this will only work if your VM's don't use all the memory available to them, this is because ESX will use the unused memory for the machines that needs it. So if one of the machines is using 2Gb of memory all the time and another is only using 512mb of it's 2Gb allocated, then a third machine can use some of the memory of the second machine (unless reservations are used).

Quote VMware guide:The host allocates the number of MB specified by the reservation directly to the virtual machine.

Anything beyond the reservation is allocated using the hostʹs physical resources or,when physical resources arenʹt available, handled using special techniques such as

ballooning or swapping.

I suggest reading the resource management guide from VMware for more info on memory allocation

Curdasss
Hot Shot
Hot Shot
Jump to solution

I have a cluster of 3 ESX servers each with 16GB RAM, they are each running about 15 VM's, all of the VM's have about 1GB of RAM. Everything runs fine there are no issue's with the VM's or the ESX servers, I've even had VM support commend us at haveing those running at the same time. Now granted we've done a lot of research on when the machine are using the RAM and we have them setup in a way where there is no contention between the VM's at all.

Erik_Zandboer
Expert
Expert
Jump to solution

Hi,

When you look at the summary of your host, it states the amount of memory used. This is usually a nice quickview to see how much memory is available for additional VMs.

The number of VMs you can run on 16GB of memory depends largely on how much they will actually consume, combined with the differences between VMs. ESX has a feature which maps duplicate (virtual) memory pages to a single physical one. So, all memory not used at all by a VM results in empty pages, which are all mapped on a single physical page (thereby saving physical memory). Also, if all of your VMs are derived from the same template, a lot of memory pages will be identical when the VMs are running. This will also save more physical memory. The more differences in your VMs, the less physical memory will be saved.

What is also usefull, is just to load your ESX host up with VMs, while you keep on checking for memory ballooning (performance tab, realtime memory, ballooning). As soon as ballooning starts to occur on any VM, it means that the VM in which ballooning occurs is slowed down. This is probably the point where you want to stop adding VMs, possibly even remove a VM to make sure ballooning will not occur on a regular basis. It all depends on how far you want to push your ESX environment from this point on, and how big a performance hit you are willing to take.

In answer to your question: You actually can assign more memory to all your VMs than you have physically available. How far you can "overlay" depends on both the actual memory usage of your VMs, and how much your VMs are "alike" (read: how many virtual memory pages they have in common)

Visit my blog at http://www.vmdamentals.com
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

In general you do not want to overcommit memory (allocate out more than you have available), in addition, you do not to assign to VMs more memory than they need. So the number of VMs depends on the amount of physical memory - 1 GB (used by SC and vmkernel) and how much memory each individual VM uses (not allocated). If your memory allocation is close to what is being used, you can determine exactly how many VMs you can place on the machine.

However, if for example you allocate 1 GB to each VM, you are thereby allowing the VM to use the complete 1GB. If there is a process that goes bad and runs out of control it can use all available memory. Thereby you would be limited to 15 VMs in this case. Limiting memory by VM is the better choice as you can get more VM per node. So take careful measurements of necessary memory and reduce VMs to close to that size if you feel that you can otherwise you can trust the balloon driver (if your VM supports it) or overcommit memory which produces bad performing VMs.

You need to balance real measurable needs vs what the VM could maximally use.

Best regards,

Edward L. Haletky, author of the forthcoming 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', publishing January 2008, (c) 2008 Pearson Education.

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos