If you have been hunting for a virtual private server for a while, you should know all the metrics that service providers use in their advertisement and package/plan pages. You have your monthly data transfer amount (which sometimes are confused with “bandwidth”). There is a disk storage space for your operating system and data files. For OpenVZ based VPS hosting, there is also “guaranteed memory” and “burstable memory”, which I think are probably one of the most-misunderstood concept on forums such as Web Hosting Talk. This post is a reflection of what I commented on WHT last week, in a thread that discusses Xen vs. OpenVZ (which I also wrote about 2 years ago).
Basically, my conclusion about looking at an OpenVZ hosting plan is — just look at the burstable memory and (most of the time) you don’t have to worry about the guaranteed memory.
I know it’s a pretty bold statement because in almost every thread people asking about memory usage on WHT, the suggestion has always been just focusing on the guaranteed memory and you should not rely on the burstable memory. I think those advices came from misunderstanding of how OpenVZ works. After all, you may just call “guaranteed memory” and “burstable memory” marketing terms for virtual servers. In real OpenVZ terms, these are roughly mapped to
oomguarpages (for guaranteed memory) and
privvmpages (for burstable memory) in user beancounters.
According to OpenVZ wiki, the so called “guaranteed memory” –
The guaranteed amount of memory for the case the memory is “over-booked” (out-of-memory kill guarantee).
Oomguarpages parameter accounts the total amount of memory and swap space used by the processes of a particular container.
If the current usage of memory and swap space (the value of oomguarpages) plus the amount of used kernel memory (kmemsize) and socket buffers is below the barrier, processes in this container are guaranteed not to be killed in out-of-memory situations.
Emphasis are mine. Note that what is guaranteed is not as simple as “your portion of physical memory” like how a Xen VPS with a guaranteed memory. What is guaranteed is here that your virtual environment (VE) will not have random processes killed, if your VE’s committed memory (physical + swap) is less than your
oooguarpages barrier, when the hardware node (HN) is in out-of-memory (OOM) situation. That means
You can use as much memory as possible, as long as the hardware node does not run out of memory. However, often you will find that your VE is still limited by the maximum allowed allocation amount, i.e.
privvmpagesparameter, i.e. the so-called “burstable memory”.
You run the risk of having your processes killed when the HN has exhausted its both its physical memory and swap, if your committed memory is greater than
Well, for HN to run out all its memory it needs to use up all its swap. If a hardware node has 2 part of swap memory for every part of physical member, it means by the time OOM occurs, 2/3 of your process pages are deep in the swap. And if you are actually using your VPS to host websites, your processes would already been swapping like crazy by then. A quick death (killed by OOM) or dragging painful one (constantly swapping)? I’ll take the former :)
Seriously. There is no point for providers to advertise “guaranteed memory”. By the time it is actually used, during an OOM event, the hardware node is already way oversold. Providers should just use the “burstable memory” in their plan pages as that’s about the only meaningful way to cap a VE’s memory usage. Or just get rid of the word “burstable” as it just introduces more confusion.