Proxmox VE Bizzare Memory Issue

johnr2k

New Member
Jul 3, 2025
4
0
1
I loaded the latest version of Proxmox VE on a server where I have 64GB of RAM.

Initially I have created 1 Virtual Machine only and it’s a Debian 12 OS with FreePBX. I gave the VM 12GB of ram but the actual system really isn’t meant to need any more than 4GB. I’ve run this exact same thing on a very basic Machine with 4GB and the Debian 12 with freepbx usually hovers around 1.5/1.6GB memory usage.

However with proxmox I’m noticing some seriously bizzare memory issue. The PVE summary is telling me that the FreePBX VM is using 4.5GB. When I first booted it up it hovered around 1.4GB then gradually as days went by it kept climbing after 3 weeks it’s now raised to 4.5GB.

At first I thought there’s an isssue with the freepbx Debian install. So I went into the machines console and typed free -h and surprise surprise the freepbx machine is reporting that it’s only using 1.4GB but PVE dashboard is showing it as 4.5GB and this number keeps increasing on the PVE dashboard without any sign of it going down at all.

Can anyone please help?

I am new to proxmox and this is my first trial of it.

Also. With freepbx using 4.5 the total server usage is 7.2GB which means PvE using around 2.7GB. Is that normal?
 
It's probably filesystem cache (which is often not shown in reports as the memory is reusable) and there are lots of threads about this on this forum (but it's not specific to virtualization, only more visible). If you think the VM should not need or use more than 4GB then set the VM memory to 4GB, otherwise it might use all of the memory you give it (as unused memory is wasted memory).
 
Last edited:
  • Like
Reactions: _gabriel
It's probably filesystem cache (which is often not shown in reports as the memory is reusable) and there are lots of threads about this on this forum (but it's not specific to virtualization, only more visible). If you think the VM should not need or use more than 4GB then set the VM memory to 4GB, otherwise it might use all of the memory you give it (as unused memory is wasted memory).

Thanks. Just to clarify and make sure I’m understanding this correctly:

Although the VM sees that it has 12GB allocated and is only actually using around 1.5GB (as reported from inside the VM), the higher memory usage I’m seeing on the Proxmox host side is due to the host using some of that allocated memory for filesystem caching and other performance optimizations. So even though it looks like more memory is being "used" from the host’s perspective, it's still available to the VM if needed and is helping to improve efficiency in the meantime. So if the VM was to need more memory, the host will free it up from the cache it's using it for? So if the VM for example was to need it's full 12GB then the host will free up all the cache essentially?

Is that the right way to interpret it?

How big do these caches grow to? will it just keep indefinitely growing and growing?
 
... the higher memory usage I’m seeing on the Proxmox host side is due to the host using some of that allocated memory for filesystem caching and other performance optimizations.
No, the higher memory usage is inside the VM and probably filesystem cache. You should check this using the tools that the operating system inside the VM provides.
 
As far as I know it's the ballooning driver communicating the memory usage, not the guest agent. I might be wrong though.
 
  • Like
Reactions: Johannes S
No, the higher memory usage is inside the VM and probably filesystem cache. You should check this using the tools that the operating system inside the VM provides.
Oh ok so i ran "free -h" again on the FreePBX debian 12 VM and it says: Total: 11Gi, used: 1.3Gi, Free: 7.7Gi, Shared: 3.7Mi, Buff/Cache: 3.1Gi, Available 10Gi


So it does seem like the VM itself is using what Proxmox UI is showing. Originally i just saw used: 1.3Gi but didn't see the Buff/Cache part. Is this normal behaviour for the system to want to use that much Buff/Cache? does it just indefinitely grow? yet it says available amount that reflect total minus used without taking the Buff/Cache into account.
 
Memory allocation and usage calculations are usually a lot more complicated once you dive deep into that topic ;)

Things like buffers can easily be dropped to free up memory if needed, therefore it is usually still seen as "available" memory. Unused memory is a waste of resources, therefore caches can grow quite a bit.
When it comes to the memory view outside the guest on Proxmox VE, currently it will show one of two values. If the ballooning device is enabled and the guest is reporting back detailed infos, Proxmox VE shows the "guest view". You can check that yourself too if you navigate to the "Monitor" menu of the VM and issue the command info balloon.
If Proxmox VE isn't getting back detailed memory information, either because the ballooning device is not present or because the guest doesn't deliver detailed infos, it is showing the "outside" view of how much the VM is consuming on the host.

Since this is quite a bit confusing too, we are currently working on adding a dedicated "host view" gauge to the VM memory infos too, so that you can always see both, the inside guest and outside host view.
 
If you wish to limit or flush the buff/cache used search online for your specific OS/distro used.

Here is a good general Linux example.
 
Little hijacking:
Is there a sensible (and easy/simple) way to regularly drop the e.g. page cache in a smart way? Like e.g. drop it respectively parts of it only, if it/they did not get accessed for more than e.g. an hour?
 
I think it’s all making sense now. Is there no way to have proxmox ui report used and available memory instead? Without taking the cache into account? Or break it down
 
I think it’s all making sense now. Is there no way to have proxmox ui report used and available memory instead? Without taking the cache into account? Or break it down
If you have the ballooning device enabled, and the guest reports back detailed memory info, then the memory shown as used, should match very closely, what the guest is showing as used.

Splitting it up more could be done, but will always be somewhat wrong, because, at least on Linux machines, you have more categories than just "used, caches, unused". Which is why for the Proxmox VE host itself, we stopped trying to calculate the free memory ourselves. It will never be actually accurate, instead we rely on the info from the Linux kernel to retrieve how much it sees as "available" memory: https://git.proxmox.com/?p=pve-common.git;a=commit;h=219fe335b6226d66cffe171d74d5dd4a8f3a64e8

As I said, once you dive deep into the whole memory stuff, things get complicated quickly ;)
 
  • Like
Reactions: Johannes S and UdoB
Just providing an example
Bash:
# info balloon
balloon: actual=1024 max_mem=1024 total_mem=960 free_mem=458 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=1316 minor_page_faults=649736 last_update=1751889732


1751889561029.png