Another popular question we get at OpenVZ.ca is: “What is the difference between Guaranteed and Burstable RAM.”
To answer this question we must first briefly understand how OpenVZ works. Unlike other virtualization methods (XEN, VMWare) OpenVZ does not “Guarantee” system resources. Think of it more like a “chroot” of sorts. While it is not exactly the same as the chroot definition, it acts similarly to those principles. As a result the Virtualized Environments (VE’s) will share the Harware Node’s Kernel, RAM and SWAP space. From there, OpenVZ sets limits to each individual VE for such things as CPU speed and time, hard drive quota, hostname, IP addresses and more.
All of these limits are viewable in the following file on a OpenVZ based VE: /proc/user_beancounters
So how does all of this information relate to the amount of RAM on my VPS??
The important number is the Burstable amount. The reason for this is because the majority of programs allocate memory for more than what they actually use. Usually this is about double.
Lets take YUM for example. In order to run it, almost 100mb of RAM will get allocated, but it will only use about half that (there are variables here depending on what it’s actually doing). Majority of programs do this just incase they need more.
Example: If the “Small” package on OpenVZ.ca were to have 128mb burst and guaranteed RAM, running #yum update -y would lead to an error. This is because the yum program will try to allocate about 100mb of RAM. OpenVZ will see that this is higher than the burstable limit (assuming there are other things running as well), resulting in the error.
Since the “Small” VPS package has a burstable amount of 256mb it allows YUM to excecute perfectly. The actual RAM usage is under the guaranteed 128mb and the allocated is under 256mb.
The Guaranteed RAM is the amount the can be used, the Burstable RAM is the amount that can be allocated. Generally assume that the program will allocate double the RAM it uses.
Recommendations When Buying
In general, build up a good relationship with your host and make sure they are honest with you. There is nothing wrong with asking for the full spec of the hardware node and asking how many customers are on it or how much of it’s resources are allocated (or intend to be allocated).
From there it’s important to know just how much ram your system will be using. Always get double the amount of burstable ram to ensure that your programs will run perfectly. If you know your system will be using 512mb of ram, make sure that you get a burstable amount of 1gb or more. Always look at the burstable limit as a rule of thumb.
In the end, it’s your money and you need to make sure that it’s being well invested.