What is the big difference between vSwap and Burstable RAM?

Does vSwap create and cause I/O by using disk? I know SWAP will use the disk so is vSwap the same as swap just virtualized in the container.


Burst memory is essentially memory that you can use if the host node has memory available and you have exceeded the memory guaranteed to your container. This is a flawed system because applications do not read memory in OpenVZ beancounters. It means that your VPS thinks it has more memory than the host node actually guarantees that you have.

For example, if I set a memory guarantee of 1GB and gave you 2GB burst, you would see a VPS that has 2GB of memory to use. However, if your usage exceeded 1GB and the host server had no memory to give to you beyond that point, the OpenVZ kernel begins to kill off your processes to drop your usage to a value equal to or lower than 1GB, your guaranteed memory.

The more appropriate solution was vSwap. Applications typically do not want to fill up swap space with frequently accessed data. This is typically (with plenty of exceptions) treated as the additional memory storage to keep you running if your memory usage happens to exceed that of your physical memory. Swap is, on a normal Linux system, disk space. Disk is slower than RAM. Treating the system disk as RAM has an impact on performance. OpenVZ assigns vSwap as actual RAM on the host node instead of disk space. To simulate a more native environment, the kernel artificially slows down the container so as to make swapping unattractive as it is generally thought to and expected to be.

The idea behind using RAM to assign vSwap instead of disk is that you do not want disk latency to increase for all users on the server when a few containers start maxing out their memory and swap. By assigning it to RAM you avoid unnecessary disk performance problems.

For an OpenVZ VPS that performs more like actual virtualization or like an actual dedicated server, vSwap is the choice you would make and Burst is outdated.

  • 1
    Burst is indeed flawed and it allows VPS vendors to grossly "oversell" VPS, with the "free" command reporting much more memory than is actually available. "Burst" is based on the principle of diversity - not all VPSses are expected to eat into "burst" memory at the same time, the flaw is that, statistically, this usage will eventually overlap. Furthermore, people paying for a VPS with a big memory footprint are likely to have a continuous requirement for that memory, not a transient requirement. – Rodney Mar 25 '15 at 12:00

vSwap is calculated as the difference between the amount of ram you assign to a container subtracted from the amount of burst memory you assign it. A positive number creates vSwap to account for the differemce. As far as iopts on a physical drive as a result of virtual memory manipulation I don't have any hard data but I'd think the answer is probably no, or at least not significantly more than any other memory management system

  • That's the way the solusvm control panel calculates it. Although in the solusVM interface they appear to be related, VSwap and Burst are infact completely different concepts, and different lines in the config files – Rodney Mar 25 '15 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy