Hi
Welcome !! :-)
You're almost right. The limit is the setting that limits the use of PHYSICAL host memory, but not swap memory.
In your example:
1024MB assigned, 256 MB reservation, 756MB limit.
What happens:
1- At boot time ESX wil check to see if it can allocate 256MB physical host memory to the VM. If that is possible the VM can be started.
2- When the VM starts using more than 756MB, all memory above 756MB will be used from the Swap disk, which is very slow compared to physical RAM.
The ballooning starts when the limit is reached and ESX will tell your Guest OS to move rarely used / unimportant memory pages to local harddisk (swapfile inside the Guest), but if there is still not enough free memory, it will swap to disk.
Keep in mind with reservations, that ESX has to make sure there is 256MB of RAM for that VM in physical memory otherwise it won't start !!! When using a lot of reservations, this could get you into trouble. Say you have 10 VMs, all between 4 and 8GB RAM and for each VM you reserve 2GB of physical RAM, then to be able to start your VMs you need 20GB of free physical memory. Even though they're not using all the RAM they have a reservation for.
With limits you should also be careful since these immediately impact the performance because they will swap to disk all memory above the limit. A common mistake is that admins set the limit equal to the assigned memory. There is no need for that and it will actually impact DRS performance.
So common sense rules:
- Don't use limits unless you really really, I mean really have a valid case for that
- For reservations there are more use cases, but also be very careful when using them.
- With many things in vSphere environments that influence performance (using limits, reservations, shares, etc for cpu / memory / network / disk) it is often that vSphere knows best and you should only use them when you understand the impact.
Tips for good read on severall of these subjects:
- http://www.yellow-bricks.com/
- http://frankdenneman.nl/
and also my own site :-) http://www.gabesvirtualworld.com/
Have fun with ESX :-)
Gabrie