Proxmox showing incorrect usage for Ubuntu VM

prox145

Member
Jun 23, 2021
19
0
6
I came across this thread: https://forum.proxmox.com/threads/memory-usage-not-same-as-in-vm.82640/

which is the exact same issue I have, however the guy didn't end up replying back.

I'm running Ubuntu 20.04.3 with PVE 6.4-4, Ballooning device is enabled in the Memory Settings:
1644568671997.png

Doing
Code:
info balloon
in Monitor returns:
balloon: actual=65536 max_mem=65536 total_mem=64319 free_mem=36351 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=2521 minor_page_faults=18836128 last_update=1644568685

Awaiting your reply, thank you!
 
If you look at the info balloon output you see that linux only reports free RAM (free_mem=36351) and total_mem. So all you can get is how much RAM is free and how much RAM is used (total - free). There is no way how PVE could know that the used RAM is used for. All RAM used by the geust for caching and so on is still used and not free RAM. Many programs like top and htop will display "available" RAM like it is some kind of free RAM but in reality it isn't. "Availalbe" RAM is RAM that is used but only contains unimportant data (like caches) which the guest OS can quickly delete if other processes need more RAM.

Best you run free -h inside the guest to see how much RAM is "free", "availalbe" or "used". What PVE will show as free RAM is the actual physical RAM that is used by your VM (no matter what it is used for) and this should be the same what free -h is reporting as "free". Everything that is not "free" is used.

See: LinuxAteMyRAM.com
 
  • Like
Reactions: Crafting_tunbol

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!