Incorrect RAM usage in webui for VM

ca_maer

Active Member
Dec 5, 2017
179
14
38
42
Hello,

It seems the ram usage in the webui is incorrectly reported in our case. The VM is an ubuntu 20.04. The host is running ZFS. Ballooning is off. This is happening for all of our VMs.

Here's a picture of the webui:
Screen Shot 2020-06-10 at 9.34.29 AM.png

and here is free inside the VM
Code:
              total        used        free      shared  buff/cache   available
Mem:           3983         308        1877          24        1797        3583
Swap:             0           0           0

Any ideas what might cause this ?
Thanks
 
Last edited:
Hello,

It seems the ram usage in the webui is incorrectly reported in our case. The VM is an ubuntu 20.04. The host is running ZFS. Ballooning is off. This is happening for all of our VMs.

Here's a picture of the webui:
View attachment 17768

and here is free inside the VM
Code:
              total        used        free      shared  buff/cache   available
Mem:           3983         308        1877          24        1797        3583
Swap:             0           0           0

Any ideas what might cause this ?
Thanks

Notice how available is 3583 (3.59 rounded) wich matches the 3.59 out of 4.00 GB, an unusual way of representing memory usage by Proxmox.
 

ca_maer

Active Member
Dec 5, 2017
179
14
38
42
it is a classic in the world of computing :D
I understand what you mean but Proxmox should report the same memory usage as how free does. When looking at the webui you might think the ram usage is at 90% while it's really just at around 14%. There's might be more to it in the background which is why I created a thread. I'm trying to understand the reasoning here.
 
I understand what you mean but Proxmox should report the same memory usage as how free does. When looking at the webui you might think the ram usage is at 90% while it's really just at around 14%. There's might be more to it in the background which is why I created a thread. I'm trying to understand the reasoning here.

Just checked, on this machine the webUI reports all correctly as on the commandline. I must add i experienced the same issue as you observerd. With me memory usage was wildly overreported, close to 25GB while just 5GB was in use. I assume this to have been because of hugepage configuration. I will revive it in the future, now it is not enabled an memory is reported as is.
 

ca_maer

Active Member
Dec 5, 2017
179
14
38
42
Just checked, on this machine the webUI reports all correctly as on the commandline. I must add i experienced the same issue as you observerd. With me memory usage was wildly overreported, close to 25GB while just 5GB was in use. I assume this to have been because of hugepage configuration. I will revive it in the future, now it is not enabled an memory is reported as is.
What is the OS of the guest ?
 

ca_maer

Active Member
Dec 5, 2017
179
14
38
42
The issue is still present. Using Ubuntu 20.04 with qemu guest agent installed.

Screen Shot 2020-07-28 at 2.41.17 PM.png

Inside the VM:
Code:
              total        used        free      shared  buff/cache   available
Mem:           8079         679         323          42        7076        7240
Swap:             0           0           0

It's like if the Proxmox webui count the buff/cache column as used ram
 

BloodyIron

Active Member
Jan 14, 2013
211
6
38
it.lanified.com
I find that Proxmox RAM reporting is never accurate, and it's quite useless to be honest. I build a new VM and haven't done anything with it. 6GB RAM capacity, only using about 400MB, and qemu-guest-agent installed (Ubuntu 20.04 in this case) and it reports over 5GB of RAM used. And that 400MB used includes cache and such, and this is right after a reboot.

I really want the developers to revisit how RAM is reported in the webgui, and if they want to clear up any ambiguity around it, maybe report all the different stats for RAM? Not just lump it into one figure? It's really very useless and unreliable in its current form. I just don't even bother with it any more, why even have it if it's unreliable? Bleh.
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
6,694
1,169
164
see the admin guide:
Even when using a fixed memory size, the ballooning device gets added to the VM, because it delivers useful information such as how much memory the guest really uses. In general, you should leave ballooning enabled, but if you want to disable it (e.g. for debugging purposes), simply uncheck Ballooning Device or set
Code:
balloon: 0
in the configuration.

without a ballooning device, PVE can (and will) simply report the used memory of the Qemu process. with a ballooning device, total - free will be reported (since cached/buffered memory is treated differently by different guest OSes, this might not match what the OS reports as 'free').
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
6,694
1,169
164
also, the ballooning interface has no notion of memory buffered/cached/easily freeable by the guest OS, since that happens on the next layer. total - free is all we can report via that interface ;)
 
  • Like
Reactions: ca_maer

spirit

Famous Member
Apr 2, 2010
5,321
520
133
www.odiso.com
buff/cache memory is really used by the vm, and cannot be used by other vms.

So, I think you just need to think that "memory usage" on the gui, is memory usage from the hypervisor side/view. (and that's great, if you want to list vms ordered by memory usage, or do some kind of balancing,...).

if you need to monitor vm memory, you can use classic tools like grafana,prometheus,influxdb,cacti,nagios,.... in the vms directly.
 

ermanishchawla

Active Member
Mar 23, 2020
319
25
28
35
Hello,

It seems the ram usage in the webui is incorrectly reported in our case. The VM is an ubuntu 20.04. The host is running ZFS. Ballooning is off. This is happening for all of our VMs.

Here's a picture of the webui:
View attachment 17768

and here is free inside the VM
Code:
              total        used        free      shared  buff/cache   available
Mem:           3983         308        1877          24        1797        3583
Swap:             0           0           0

Any ideas what might cause this ?
Thanks
It is correct only. The memory showing available is actually a reclaimable space by kernel.
Read the article attached for your reference. It is true for Ubuntu/RHEL/CentOS
 

Attachments

  • memory_usage.pdf
    241.4 KB · Views: 33

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 your own in 60 seconds.

Buy now!