VMware Cloud Community
nsmallcomb
Contributor
Contributor
Jump to solution

Virtual Machine Resources Settings: Memory Limit

What is the point of the limit control on the VM Settings > Resources tab > Memory.

If you specify a limit that is GREATER than the amount of \*physical* memory you allocated to the VM, the swap file gets bigger, but the system still has the same amount of \*physical* memory. Why would you want to do this?

If you specify a limit that is LESS than the amount of \*physical* memory you allocated to the machine, you are now limited by that number. Why would you do this?

Any input?

0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

Limit is misleading, a VM cannot use more memory then it actually has assigned to it. All that setting is good for is to limit the maximum amount of host memory a VM can use, once it reaches the limit it digs into it's vswp file. The limit slider should actually be 0 to the amount of RAM a VM has assigned to it not 0 to the amount of total RAM the host has.

So if you had a server with 1024MB of RAM and set the limit to 512MB the VM could only use 512MB of physical host memory and 512MB of vswp memory. The VM stills see 1024MB of memory, ESX just controls how much physical host memory it gets through limits.

See this post...

http://www.vmware.com/community/thread.jspa?messageID=632903

Message was edited by:

esiebert7625

View solution in original post

0 Kudos
6 Replies
MR-T
Immortal
Immortal
Jump to solution

Using these settings allows multiple machines to play nicely.

By capping the amount of memory or CPU a VM can use, it prevents a rogue application running away with all the resources on a server.

0 Kudos
nsmallcomb
Contributor
Contributor
Jump to solution

Consider reading a bit deeper into my question. I understand the point of Resource allocation/Resource pools. I am specifically asking about the Limit slider on the Memory screen of the Resources tab of a VM's settings.

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

Limit is misleading, a VM cannot use more memory then it actually has assigned to it. All that setting is good for is to limit the maximum amount of host memory a VM can use, once it reaches the limit it digs into it's vswp file. The limit slider should actually be 0 to the amount of RAM a VM has assigned to it not 0 to the amount of total RAM the host has.

So if you had a server with 1024MB of RAM and set the limit to 512MB the VM could only use 512MB of physical host memory and 512MB of vswp memory. The VM stills see 1024MB of memory, ESX just controls how much physical host memory it gets through limits.

See this post...

http://www.vmware.com/community/thread.jspa?messageID=632903

Message was edited by:

esiebert7625

0 Kudos
nsmallcomb
Contributor
Contributor
Jump to solution

great answer. thank you.

0 Kudos
nsmallcomb
Contributor
Contributor
Jump to solution

Why would you want to set the limit HIGHER than amount of RAM assigned to the VM?

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

You wouldn't, you could set it higher but the VM will not get that extra memory. The default is the total amount of host RAM which I think they should change because it is misleading. Regardless of what you set the limit to if it is higher then the VM has assigned to it, the VM is only going to get the amount of RAM it has assigned. So if you have a VM with 1GB of memory and you set the limit to 2GB all that means is the VM is able to use up to 1GB of host memory. Reservations on the other hand guarantee a certain amount of physical host memory.

From the docs...

http://www.vmware.com/pdf/esx3_memory.pdf

"An ESX Server host allocates the memory specified by the limit parameter to each virtual machine

unless memory is overcommitted. An ESX Server host never allocates more memory to a virtual machine than its specified physical memory size. For example, a 1GB virtual machine might have the default limit (unlimited) or a user-specified limit (for example 2GB). In both cases, the ESX Server host never allocates more than 1GB, the physical memory size that was specified for it."

Message was edited by:

esiebert7625

0 Kudos