• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 435
  • Last Modified:

What is the purpose of VM Memory limits?

Can someone explain the usage of VM memory limits.  I've read a number of articles, and I still don't underestand the point of Allocating a certain amount of memory and then Limiting the VM from using it.  Obviously since it's a feature, there is a usage.  Why would you just not Allocate less?
C Emmons
0
apsutechteam
Asked:
apsutechteam
  • 2
  • 2
  • 2
  • +2
2 Solutions
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
If you have a very busy server, and memory is on a Budget, and your Boss will not let you purchase anymore, then you can put constraints around certain servers, to stop them using all the memory, and try and balance around Priority servers within your Host or Farm.

So you may have importanr servers such as Exchange, which are Priority, over the Tea Boys Tea Run software game, where you would limit the memory.
0
 
coolsport00Commented:
You can set a limit on a VM so it won't consume all the memory on a host beyond that limit. Why is that important? Honestly, for small orgs, it's not (and I'm in a small org). Small orgs typically have a large enough host (resource-wise) to handle most VMs that are placed on it. So, no Resource Pools (RPs) nor limits/reservations are typically needed. But for med to lrg orgs, separation and segregation of resources using Resource Pools tends to be setup. This is done so a more critical VM is guaranteed to have the resources it needs to continue to run at or near peak performance, or will be able to boot if restarted.

So, for example, say you have an Exchange VM and an app server VM on a host. For most orgs, it's more critical to make sure the Exchg VM stays running at high performance. To verify it does not run into an issue resource-wise, an admin will set a memory limit on the app server VM, so the Exchg VM won't run into any memory constraints, and performance will stay fairly consistent. I guess you can think of it like this - a setup like this will mostly come from organizational SLAs for a given server/service/VM. VMware provides tools to help meet those SLAs in keeping a server and/or service 'available' to it's employees.

Hope that makes sense.

Regards,
~coolsport00
0
 
apsutechteamAuthor Commented:
I understand that you would want some VMs to have more priority than others - memory, CPUs, shares, etc..  My questions is why not Allocate less memory to machine you wish to have less than priority - rather than Allocate  an amount and then Limit them from using it.  Why would you Allocalte 2 GB for instance, and set a Limit of 1 GB - why not just Allocate 1GB to start with?
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
coolsport00Commented:
EXACTLY! :) You see, VMware has changed its tune, so to speak, with the release of vSphere 5. Before, they were say, "give VMs more resources" (within reason, of course) and monitor performance or configure Reservations and/or Limits. Now, they are saying "watch what resources (at least memory-wise) you give VMs, because we are now 'dinging' you with vRAM Pool licensing with vSphere 5". So, bascially, admins should already be watching how much RAM they give their VMs, but with v.5, they most certainly need to watch or they won't have good consolidation ratios (VMs per host CPU core).

Sometimes admins allocate logically so based off specs of the OS, or based off the app that's on the VM. Sometimes not...they would just allocate what they "thought" a VM should have. So really @apsutechteam, you're already in the right mentality. But again, some larger corp's need to meet SLAs for a given server/service so to GUARANTEE other VMs in the farm have the memory needed to run and/or boot up upon restart, Limits are set on other VMs. I think you might also benefit from reading how memory is managed in VMware? Memory can be swapped, shared, or 'ballooned' depending on VM guest OS memory need.

v4 and earlier: http://www.vmware.com/files/pdf/perf-vsphere-memory_management.pdf
v5: http://www.vmware.com/files/pdf/mem_mgmt_perf_vsphere5.pdf

~coolsport00
0
 
apsutechteamAuthor Commented:
I actually read that article yesterday, and found it very interesting - although I'm still not clear on why Limits verus readjusting Allocation. What has peaked my curiousity further is a download of the Free/Eval VMTurbo product.  It recommends things to you based on current performance.  I know I have some VMs with too much memory - especialy those P2Ved. On some it recommends reducing memory Allocation -- while others Limiting memory. Why not just recommend reducing all of them to something more appropriate - instead of using Limits for some.  I started trying to determine the difference between Limits - verus reducing Allocation.  If your trying to meet an SLA for another VM -- why not reduce Allocation - it doesn't seem any harder  - and it appears to be two ways to do the same thing -- so why create Limits? Why is it advantageous to set a Limit - not Allocate less? Allocation is a implicit Limit right -- so why set Allocation higher and Limit to less? I understand the need for SLAs and priorities -- but not the method distinction between Allocation and Limit. I'm not arguing against Limits -- I just don't understand their usage versus reducint Allocation.
Thanks.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Very few of our clients set limits, because they actively monitor their VMs for performance to check they have allocated enough memory for the virtual server. Check Active Memory, this is the Metric to watch!
0
 
wlacroixCommented:
I think you can limit without having to restart the VM?

If you restart the VM you may be outside of your SLA, in come cases if you break the SLA it costs you money, and that is bad :)

We use share limiting and adjust the shares, all 32 bit servers are configured with the maximum 4 gig of ram while 64 bit servers are limited to 10 gigs unless absolutely required.
We find that 90% of the time more ram is not the case, even with SQL servers. You are harder up for disk access time for example.

This is a very interesting conversation and I would be interested in any memory based articles you are reading for 4.x World.
0
 
cdjcCommented:
wlacroix hit it right on.  With memory limits, you are able to bump up the amount of available memory to a running virtual machine without having to reboot it.

On a VM that has 1GB limit and 2GB allocated, you could effectively "add" another 1GB to the running VM by increasing its limit in the Resources tab, and not have to reboot the VM.

Memory Hot-Add can make this a moot point, though, but then again that feature isn't supported in all operating systems, leaving limits as the only alternative for those particular cases.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now