Forum Discussion
jr2299
Oct 13, 2026Brass Contributor
Hyper-V Ubuntu VM: Memory Demand Different at Hyper-V and OS Level
Hello all, Looking for advice and insight for a strange problem we are experiencing. We have a cluster of Windows Server 2025 hosts, on which we are using Hyper-V manager to run mostly Windows ...
WinEndpointOps
Oct 22, 2026Brass Contributor
This pattern usually comes down to Linux page cache. Linux uses spare RAM as file cache and does not give it back until it is needed, and Hyper-V counts that cached memory as demand because the guest reports it as in use. So the host sees demand keep climbing toward whatever you assign, while a tool inside the VM that shows "used" (without cache) looks low. That also explains why going from 32 GB to 64 GB just moved the ceiling.
To confirm and fix it:
- Inside the VM, run free -h and look at buff/cache and the available column, not just used. If available is large and buff/cache is what is growing, it is cache, not a leak.
- As a one-time test, run sync and then echo 1 as root into /proc/sys/vm/drop_caches. If Hyper-V demand drops soon after, that proves it. Do not put this in a cron job, it is only a diagnostic.
- Check for a real leak anyway with ps aux --sort=-rss | head. Guacamole is guacd plus Tomcat/Java, so look at the Java heap and any large log files being written, since heavy logging fills the cache quickly.
- Right-size the VM. Guacamole for a cluster rarely needs 32 or 64 GB, and 4 to 8 GB is often plenty. A smaller fixed allocation (or Dynamic Memory with a sensible maximum) stops the VM from claiming a big share of the host for cache.
- Make sure the Hyper-V integration drivers are loaded in the guest (lsmod | grep hv_) so ballooning works when the host needs memory back.
If available stays high and cache is the cause, you can safely lower the assignment and the demand number will follow.