Skip to content

VPS: Understanding and Fixing Ballooning and High RAM Usage

Does your VPS show less RAM than expected or report high usage? Learn how to recognize ballooning, find the biggest memory user, and fix high RAM usage.

21 November 20268 min read77 Views0 helpful

Introduction

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.

Benefits of ballooning

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.

How to recognize ballooning on your VPS

When the host is reclaiming memory, this is what you will see in your VPS's operating system:

  • Linux: free -h or htop shows 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 high RAM usage step by step

  1. 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 free counts 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.
  2. 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.
  3. Check usage on the server:
    • Linux: Connect via SSH and run free -h. The available column is the one that matters. Linux uses the value shown under buff/cache as 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.
  4. Find the biggest memory user: On Linux, press Shift + M in htop to sort by memory usage. Alternatively, ps aux --sort=-%mem | head lists the ten biggest memory users.
  5. 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).
  6. 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: The RAM tile does not show a value from Windows

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.

Dashboard restart still pending

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).

Set up Balloon Service in Windows

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:

  1. Connect to your VPS via Remote Desktop.
  2. Download the latest VirtIO guest tools: virtio-win-guest-tools.exe from the official download directory.
  3. 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.
  4. Open Services (services.msc), find Balloon Service, set the startup type to Automatic, and click Start.
  5. After about a minute, the RAM tile will show According to guest system, without cache.
Info

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.

Configure ballooning

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.

Info

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.

More ways to fix high RAM usage

Limit applications

Many applications use as much memory as you allow them to. Set limits as needed:

  • Java applications (e.g., Minecraft servers): Set -Xmx so that at least 1–2 GB remains available for the operating system.
  • Databases: Adjust the innodb_buffer_pool_size value in MySQL and MariaDB to match your available memory.
  • Docker: Limit containers with --memory or mem_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.

Create swap (Linux)

A swap file helps absorb short-term usage spikes so the system does not immediately terminate processes:

bash
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
Warning

Swap is stored on disk and is significantly slower than physical memory. If your server uses swap continuously, you need more RAM.

Set up a high-usage alert

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).

Info

The alert only works when the RAM tile shows the According to guest system.

Add more memory

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.

Tip

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.

Troubleshooting

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.

Conclusion

You now know how ballooning distributes memory, how to recognize it on your VPS, and how to check and fix high RAM usage. If you have any further questions, our support team is happy to help every day! 🙂

FAQ

Frequently asked questions

Ballooning is a technology for dynamic memory management in virtualized environments. It allows the hypervisor to distribute physical RAM flexibly among VMs.
When the host server is heavily loaded, it temporarily reclaims memory through ballooning. Linux then shows less total memory, while Windows shows high usage. When the host is less busy, your VPS gets the memory back. If you need all your RAM at all times, disable ballooning on the Settings tab.
No. ZapX does not stop or lock your VPS because of high RAM usage. If memory runs out, your operating system terminates processes itself; on Linux, this is done by the OOM killer. As a result, a service may suddenly stop working.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.