Back to OpenVZ Documentation

    What is VSwap?

    Understanding VSwap memory management in OpenVZ virtualization.

    Understanding VSwap

    VSwap is a memory management feature in OpenVZ that provides a more predictable and user-friendly memory allocation system compared to the traditional OpenVZ memory model.

    Key Benefits of VSwap

    • Simpler Memory Model - Uses familiar RAM + Swap concepts instead of complex parameters
    • Better Performance - More predictable behavior under memory pressure
    • Easier Configuration - Single parameter to configure instead of multiple memory limits
    • Improved Stability - Reduces Out-of-Memory (OOM) killer issues

    How VSwap Works

    With VSwap enabled, your VPS has:

    • RAM - Fast physical memory allocation
    • VSwap - Virtual swap space (slower than RAM, but prevents OOM errors)

    When your VPS uses more memory than the allocated RAM, the system automatically moves less-used data to VSwap, similar to how traditional swap works on physical servers.

    Traditional vs VSwap Memory

    Traditional OpenVZ (Old)

    • Multiple complex parameters (privvmpages, kmemsize, etc.)
    • Difficult to understand and configure
    • Unpredictable behavior under memory pressure

    VSwap (Modern)

    • Simple RAM + Swap model
    • Easy to understand (just like physical servers)
    • Predictable performance characteristics

    Checking VSwap on Your VPS

    You can check your VSwap allocation with:

    free -m

    This will show your RAM and swap allocation.

    Learn More

    For detailed technical information about VSwap, please see the official OpenVZ documentation: http://wiki.openvz.org/VSwap

    Note

    All RamNode OpenVZ VPS plans use VSwap for better performance and stability. You don't need to enable or configure anything - it's automatic.