Linux VM 100% RAM usage -> suggestion

bellocarico

Member
Sep 17, 2022
67
10
13
KjEtY2lmax.png

I'm wondering why on the GUI we don't get the same Usage as the used from the free command?

Code:
root@nas-2024:~# free
               total        used        free      shared  buff/cache   available
Mem:        24615876    19966828     1428560     5503576     9450640     4649048
Swap:         998396      998180         216

Code:
root@nas-2024:~# systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
     Loaded: loaded (/lib/systemd/system/qemu-guest-agent.service; static)
     Active: active (running) since Mon 2026-05-11 12:49:04 BST; 3 days ago
   Main PID: 953 (qemu-ga)
      Tasks: 2 (limit: 28768)
     Memory: 1.1M
        CPU: 3min 58.976s
     CGroup: /system.slice/qemu-guest-agent.service
             └─953 /usr/sbin/qemu-ga

May 15 11:36:08 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:36:23 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:36:38 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:36:54 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:37:09 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:37:24 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:37:40 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:37:55 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:38:09 nas-2024 qemu-ga[953]: info: guest-ping called
May 15 11:38:25 nas-2024 qemu-ga[953]: info: guest-ping called

I mean we all know how Linux RAM allocation works I suppose... Is this GUI reporting wanted? If so perhaps it's worth splitting Used/Buffer/Cache to be represented in different (overlapping) bar colours I suppose. e.g. as seen elsewhere:

8c4qrA1bFE.png
 
Last edited:
This has been discussed to death over the years. Google proxmox wrong memory. In my experience the only OS that reports this as "expected" is windows. Or rather its balloon driver. Linux always includes the cache too. You can also check this via info balloon in the monitor tab. Please don't make me do math by using free without -h. That said I'm not against having more information in the GUI at all. Also see here: https://bugzilla.proxmox.com/show_bug.cgi?id=7493
 
Last edited:
If the balloon device is enabled and the balloon driver is working then that Memory usage bar should match free: https://pve.proxmox.com/wiki/Upgrade_from_8_to_9#VM_Memory_Consumption_Shown_is_Higher .
Did you maybe disable the Ballooning Device in the VM configuration? Are you running an operating system that comes with a driver for the balloon device?
You are correct, Ballooning is set to 0, still I do believe the reported RAM for the sake of understanding what's going on within the guest OS rather than what impact this has on the Proxmox host, is still a valid point. Debatable I suppose, but the CPU reported on a VM Summary page is certainly the CPU within the VM and not a % of the host CPU. This is the angle I'm coming from at least.

Besides this, thank you for bringing Balooning to my attention, it is actually meant to be on in my setup as I'm intentionally using no swap on the individual VMs and a high priority ZRAM swap volume on the host to address the peak RAM demand for the VMs.

This has been discussed to death over the years. In my experience the only OS that reports this as expected is windows. Linux always includes the cache too. You can also chek this via info balloon in the monitor tab.
Thanks, to be more precise it includes cache and buffers. However, this was not my point, I was genuinely questioning (no polemic just as an open discussion), why the "used" from free is not consulted here. This is regardless of the VM config, free is the most accurate RAM demand as seen by the VM.
 
Proxmox needs the ballooning device (regardless of whether you (intend to) use ballooning) and a running ballooning driver in order to get the information (like free) from the operating system inside the VM.
 
Proxmox needs the ballooning device (regardless of whether you (intend to) use ballooning) and a running ballooning driver in order to get the information (like free) from the operating system inside the VM.
Interesting. I would have thought that running the qemu agent would be enough for the host to fetch the free command output but maybe it's a bad assumption.
 
Proxmox needs the ballooning device (regardless of whether you (intend to) use ballooning) and a running ballooning driver in order to get the information (like free) from the operating system inside the VM.
Interesting. I would have thought that running the qemu agent would be enough for the host to fetch the free command output but maybe it's a bad assumption.