Virtual System RAM Limits
For Xen, KVM, LXC, OpenVZ and Vserver virtual systems, Cloudmin can define a limit on the amount of RAM the virtual
system can consume. This prevents a single system from consuming all the RAM on the host, and allows you to parcel out memory based on how much a customer pays or what an application requires.
OpenVZ, LXC and Vserver systems can also be configured with no RAM limit, which allows them to potentially consume all RAM on the host. Memory that is not actually used by processes running within the system is potentially available to other virtual systems or processes on the host, which means that RAM can potentially be over-committed.
Xen systems always have a fix RAM limit, and do not allow that block to be shared with other systems while the Xen instance is running. Thus there is no possibility of over-committing RAM.
Setting Limits in Cloudmin
When you create a virtual system, the initial RAM limit can be set in the *Resource limit options* section of the creation form. After creation, it can be adjusted at *Resources* -> *Resource Limits*. In most cases, RAM available can be changed without needing to reboot the virtual system. However, setting it lower than the amount actually consumed by the kernel and running processes may cause the system to crash.
In all cases the new RAM limit will be saved in the appropriate config file for the virtual system, and re-applied if it is rebooted.
Guaranteed RAM Limits
OpenVZ supports separate maximum and guaranteed RAM limits. By default these are the same, but you can use the Resource Limits page to set the guaranteed RAM to a lower value. The container will be guaranteed to be able to use RAM up to this limit, and may be able to allocate RAM up to the maximum limit. This can be useful when you have non-critical virtual systems whose RAM may need to occasionally burst above regular usage levels.
We discourage the use of non-guaranteed RAM limits for production systems though, as this can cause unexpected memory allocation failures.
By default Cloudmin will not even allow over-committing of the maximum RAM limit, but you can allow this via an option on the Edit OpenVZ Host page. However, guaranteed RAM can never be over-committed.
RAM Limits and System Owners
Account plans can be used to define a total RAM limit for system owners, which applies to the sum of all limits applied to systems belonging to the owner. For example, if an owner has a limit of 1GB RAM he could assign 512M to one system, and 512M to another. Or he could create just a single system with a 1GB limit. In no case will he be allowed to set a virtual system to unlimited RAM though.