all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager/qemu-server 0/2] fix memory usage reporting of VMs with an inflated balloon
@ 2026-11-30 10:20 Jonas Theisen
  2026-11-30 10:20 ` [PATCH qemu-server 1/2] vmstatus: do not count memory reclaimed by the balloon as used Jonas Theisen
  2026-11-30 10:20 ` [PATCH manager 2/2] ui: guest status: show memory reclaimed by the balloon device Jonas Theisen
  0 siblings, 2 replies; 3+ messages in thread
From: Jonas Theisen @ 2026-11-30 10:20 UTC (permalink / raw)
  To: pve-devel

The memory usage of a VM is calculated from the total and free memory
reported by the guest's balloon driver. The Windows driver keeps
reporting the full physical memory as total and accounts inflated
balloon pages as allocated, while the Linux driver removes them from
the total. With an inflated balloon, a Windows guest's reported usage
thus includes memory that the host already reclaimed, and the usage
graph can show more than the VM occupies on the host.

The qemu-server patch subtracts the part of the balloon that the guest
still includes in its total. It derives that from the reported values
rather than the OS type, so guests that already shrink their total are
not affected, and neither is auto-ballooning, which only uses the free
memory.

The pve-manager patch shows the reclaimed amount in the VM status
panel, so it is visible why the guest and host usage differ. It is
hidden while the balloon is not inflated. Showing the amount in the
memory graph as well would require a new RRD column, so this is left
out for now.

Tested on a Windows Server 2025 VM with 8 GiB of memory and a Debian
VM with 2 GiB, inflating the balloon to half of the memory each:

  VM       guest total  usage before  usage after  host usage
  Windows  8124 MiB     5406 MiB      1378 MiB     4129 MiB
  Debian    949 MiB      164 MiB       164 MiB      320 MiB

The patches do not depend on each other.


qemu-server:

Jonas Theisen (1):
  vmstatus: do not count memory reclaimed by the balloon as used

 src/PVE/QemuServer.pm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)


manager:

Jonas Theisen (1):
  ui: guest status: show memory reclaimed by the balloon device

 www/manager6/panel/GuestStatusView.js | 15 +++++++++++++++
 1 file changed, 15 insertions(+)


Summary over all repositories:
  2 files changed, 26 insertions(+), 2 deletions(-)

-- 
Generated by murpp 0.12.1




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-30 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 10:20 [PATCH manager/qemu-server 0/2] fix memory usage reporting of VMs with an inflated balloon Jonas Theisen
2026-11-30 10:20 ` [PATCH qemu-server 1/2] vmstatus: do not count memory reclaimed by the balloon as used Jonas Theisen
2026-11-30 10:20 ` [PATCH manager 2/2] ui: guest status: show memory reclaimed by the balloon device Jonas Theisen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal