Proxmox VE rocks, except for this one thing, the memory usage graph.

jpop

New Member
Aug 30, 2022
16
3
3
We have a couple of pretty beefy VM hosts running the latest VE and have on one host a fairly beefy VM because it is running a Mastodon server with 200 active accounts on it. However, the displayed memory usage in the Proxmox VE dashboard for this VM always shows 97% and higher memory utilization when it isn't being utilized like what is being displayed. A lot of the memory used is cached (we are still working on this part), but even when we clear the cache from time to time, the UI dashboard always shows memory max at 97% or higher.
  1. Are there any tips for standard Ubuntu VM's running a service with 200 active accounts that would assist in our goal of better memory management?
  2. Would this by chance be a known issue with the Proxmox dashboard?
Ultimately, we would expect the memory usage graph to show activity like the cpu usage graph does.

Screenshot 2024-06-22 at 10.19.42 AM.png
 
  • Like
Reactions: payne0420
Any reason you cant use some sort of monitoring for the VM itself?

While the "at a glance view" from PVE is great - you probably need some sort of real VM monitoring.... that would monitor the actual VM and probably provide additional useful data.

Datadog, Dyntrace for some very good paid options - abit expensive.

Observium, Netdata, Zabbix etc for "Free" options but might require some more setup/configuration.

There are a lot of decent options these days.
 
A lot of the memory used is cached (we are still working on this part), but even when we clear the cache from time to time, the UI dashboard always shows memory max at 97% or higher.
Cache is good and per unix-definition used, so the graph the PVE shows is correct. Clearing cache is the same as deleting files on a filesystem, will not overwrite it with zero so that it is actually not free, just marked as free. Clearing cache is also a very, very bad thing to do. You will want to use all memory of a system and if you still have a lot of free memory after several days of uptime, then your VM has too much memory and you should reduce it.
 
Cache is good and per unix-definition used, so the graph the PVE shows is correct. Clearing cache is the same as deleting files on a filesystem, will not overwrite it with zero so that it is actually not free, just marked as free. Clearing cache is also a very, very bad thing to do. You will want to use all memory of a system and if you still have a lot of free memory after several days of uptime, then your VM has too much memory and you should reduce it.
The problem is that we have given this one VM half of the available RAM on the host and it keeps caching it all. This Mastodon service is a monster when it comes to memory usage. None of my other VMs do this. Why only this one?
 
The problem is that we have given this one VM half of the available RAM on the host and it keeps caching it all. This Mastodon service is a monster when it comes to memory usage. None of my other VMs do this. Why only this one?
Any VM that reads/writes a lot of files will grow the cache over time. This is not a problem, it is a benefit. See https://www.linuxatemyram.com/ for info. If you don't want Mastodon to eat all of your RAM in this way, give it less memory. You very much can't count on VM's using less than you give them. See the link for why.

Also, any VM that uses PCI passthrough will pre-allocate all RAM to avoid possible issues with DMA. Probably not an issue here but something to keep in mind.
 
  • Like
Reactions: cfgmgr

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!