Ballooning is a technology for dynamic memory management in virtualized environments. It allows the hypervisor to distribute physical RAM flexibly among different virtual machines (VMs).
This process is controlled by a balloon driver inside the virtual machine, which communicates directly with the hypervisor. If the host server is heavily loaded, the hypervisor can temporarily reclaim memory from the VMs by inflating the balloon in those VMs, down to a fixed minimum. When the host is less busy, it returns the memory. Whether your VM currently needs the memory does not matter; during this time, your VPS will show less memory than you purchased.
This article also explains why your VPS shows less RAM or reports high RAM usage, how to find the cause, and what you can do about it.
Ballooning not only optimizes memory usage on a single server, but also plays a key role in maintaining a balanced and stable environment for all customers on the host system. By managing memory dynamically across all virtual machines, the host can respond even more effectively to changing workloads. This helps prevent bottlenecks and ensures smooth operation, even during peak times.
As a customer, you benefit directly from this system-wide optimization. Ballooning helps maintain consistent stability, even when several services are running at the same time.
This approach results in a more reliable infrastructure, where all customers benefit from smoother performance. Ballooning is a proven and recommended standard for the vast majority of server workloads. Disabling it only makes sense if you run highly specialized, memory-critical applications. These include workloads that require exclusive physical memory allocation without dynamic management, such as certain real-time databases or specialized low-latency applications.
When the host is reclaiming memory, this is what you will see in your VPS's operating system:
- Linux:
free -horhtopshows less total memory (total) than you purchased, for example, 3.4 GB instead of 8 GB. This value can change throughout the day. - Windows: In Performance > Memory, Task Manager shows the RAM you purchased but reports high usage, even though no program is using that much. Windows counts the reclaimed memory as “In use.” In Microsoft's RAMMap tool, it appears as Driver Locked.
This does not mean your VPS is defective, and there is no unknown process running on your server. The memory has only been temporarily returned to the host.
- Check the dashboard: Open your VPS in the ZapX dashboard. On the Overview tab, the RAM tile shows current usage, measured against the memory you purchased. The label below the value shows where it comes from:
- According to guest system, without cache: This value comes directly from your operating system and corresponds to what
freecounts as used. - Hypervisor value, including cache: Your operating system is not currently providing its own values. This value also includes the cache and is therefore often significantly higher than actual usage.
- According to guest system, without cache: This value comes directly from your operating system and corresponds to what
- Check the history: On the Monitoring tab, RAM usage shows a chart for one hour, one day, one week, or one month. This helps you see whether usage is consistently high or only increases at certain times.
- Check usage on the server:
- Linux: Connect via SSH and run
free -h. Theavailablecolumn is the one that matters. Linux uses the value shown underbuff/cacheas a cache and releases it as soon as a program needs it. - Windows: Connect via Remote Desktop, open Task Manager, and sort by Memory on the Processes tab.
- Linux: Connect via SSH and run
- Find the biggest memory user: On Linux, press
Shift+Minhtopto sort by memory usage. Alternatively,ps aux --sort=-%mem | headlists the ten biggest memory users. - Check for crashes caused by full RAM (Linux):
journalctl -k | grep -i -E "out of memory|killed process"shows whether the system terminated processes because of insufficient memory (OOM killer). - Compare with your plan: If the total memory shown by the system is less than the amount you purchased, the host is currently reclaiming memory through ballooning (see above). If all your memory is available but almost all of it is in use, an application on your server is using that much RAM.
Windows reports its RAM usage through your VPS’s balloon device and the Windows Balloon Service. If either one is missing, the RAM tile only shows the VM’s allocation on the host server. For Windows, this value is often close to 100% because Windows uses all the memory once during startup. You can see the actual usage in Task Manager. The note below the tile tells you which of the following cases applies.
VPSs migrated to ZapX from the previous ZAP-Hosting customer area were missing the balloon device. We’ve already scheduled it to be added. It will be activated the next time you restart through the dashboard: click Restart now in the restart notice, or restart your VPS using Restart. Restarting from within Windows is not sufficient. After that, the tile will show Windows’s actual RAM usage, provided the Balloon Service is running (see below).
If the balloon device is present but Windows still isn’t providing values, the balloon driver or the Balloon Service is missing in Windows. Set up both as follows:
- Connect to your VPS via Remote Desktop.
- Download the latest VirtIO guest tools:
virtio-win-guest-tools.exefrom the official download directory. - Run the file and install the guest tools using the default options. This also installs the balloon driver and QEMU Guest Agent on your server. If Windows asks you to restart afterward, restart it.
- Open Services (
services.msc), find Balloon Service, set the startup type to Automatic, and click Start. - After about a minute, the RAM tile will show According to guest system, without cache.
If the tile still does not show a value from Windows and there is no notice about a pending restart, your VPS does not have a balloon device. You can still see the actual usage in Task Manager. Contact our support team if you need the usage to appear in the dashboard.
If your application requires fixed, guaranteed memory without dynamic adjustments, you can disable ballooning in the ZapX dashboard. On the Settings tab, go to System Information and turn off the Memory ballooning switch. After a brief confirmation, the change is applied and usually takes effect immediately: your VPS is assigned the memory you purchased as a fixed amount. If the change cannot be applied while the server is running, the panel will notify you; it will then take effect the next time you restart your VPS through the panel.
For typical server use, however, we strongly recommend leaving ballooning enabled. This helps keep your server stable and responsive while contributing to efficient and fair resource distribution across the host system.
Is the Memory Ballooning switch grayed out? If the Memory ballooning switch on the Settings tab is grayed out, the OS template currently installed on your VPS does not support ballooning (this applies to some Windows templates, for example). Reinstalling with a different template that supports ballooning may resolve this. If in doubt, contact our support team.
Many applications use as much memory as you allow them to. Set limits as needed:
- Java applications (e.g., Minecraft servers): Set
-Xmxso that at least 1–2 GB remains available for the operating system. - Databases: Adjust the
innodb_buffer_pool_sizevalue in MySQL and MariaDB to match your available memory. - Docker: Limit containers with
--memoryormem_limit.
If a program's memory usage keeps increasing over several hours, it may have a memory leak. Restarting the service provides temporary relief, but a lasting fix requires an update or a different application configuration.
A swap file helps absorb short-term usage spikes so the system does not immediately terminate processes:
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
Swap is stored on disk and is significantly slower than physical memory. If your server uses swap continuously, you need more RAM.
ZapX can notify you if your VPS uses almost all its memory for an extended period. The High RAM usage event is triggered when usage averages 90% or more for ten minutes. Set it up in your account settings under Notifications > Webhook notifications, using Add channel (Discord, Slack, Telegram, or Webhook).
The alert only works when the RAM tile shows the According to guest system.
If you consistently need more RAM, upgrade your VPS on the Manage plan tab by selecting Upgrade. For the new memory allocation to take effect, restart your VPS from the dashboard afterward (the Restart required notice and Restart now button). For all the details, see VPS: Upgrades, downgrades, renewals, and cancellations.
With Scale with Me on the Manage plan tab, ZapX automatically adjusts your VPS resources based on typical usage over the last hour. This feature is disabled by default.
RAM is still missing even though ballooning is disabled
If your system still shows less memory than you purchased after disabling ballooning, the change was only scheduled and has not yet taken effect on the running server. Restart your VPS using Restart in the dashboard. Restarting from within the operating system is not enough.
The dashboard shows almost 100% usage, but there is plenty of free memory on the server
If the note below the RAM tile says Hypervisor value, including cache, your operating system is not providing its own values. The displayed value then includes cache and says little about actual usage. On Windows, this happens when the balloon device or the Balloon Service is missing. See the Windows section above for instructions on how to fix this; in the meantime, you can see actual usage in Task Manager. On Linux, check the Guest agent connection card in the overview: if the QEMU Guest Agent is running (systemctl status qemu-guest-agent), the tile will show guest system values again.
My VPS has stopped responding because the RAM is full
Open the Console tab in the dashboard and terminate the process using the memory. If the server is completely unresponsive, restart it using Restart in the dashboard, then follow the steps above to check which program is using the memory.