Proxmox 6.x consumes more memory than assigned using ZFS

Thank you @Joris L. for your kind reply. I was going to disable KSM as you suggested, but I noticed that now memory consumption is lowered to 27.62GB. That is absurd, yesterday morning it had raised to nearly 60GB and in the meanwhile I did really nothing to change the situation. I wasn't even at work.

Memory-pve-01.png

Anyway, the point is not that I care about having tons of free RAM, I'm worried about availability when needed. In your experience, if ZFS reserve half of memory and I try to start a new VM using more RAM than available, is the system able to free some reserved RAM to provide it to the VM?
 
  • Like
Reactions: Joris L.
Thank you @Joris L. for your kind reply. I was going to disable KSM as you suggested, but I noticed that now memory consumption is lowered to 27.62GB. That is absurd, yesterday morning it had raised to nearly 60GB and in the meanwhile I did really nothing to change the situation. I wasn't even at work.

View attachment 21810

Anyway, the point is not that I care about having tons of free RAM, I'm worried about availability when needed. In your experience, if ZFS reserve half of memory and I try to start a new VM using more RAM than available, is the system able to free some reserved RAM to provide it to the VM?

Interesting. I only see that temporarily when i restart all VM.

Things i will try in the future is to

  • stop some non-essential VMs which i suspect may play a role in this behavior
  • disable the ballooning service in the VM if it is running without ballooning enabled
  • disable KMS
  • learn more about proxmox
 
  • Like
Reactions: allocacoc
I cut off the head of the snake: I tried, on a second server which had full RAM too, to create two new VMs, each with 4GB of RAM, and without ballooning.

The system lowered RAM consumption automatically and than raised it again. (see graph at 11:11 and 11:21)

Memory-pve-02.png

This second server was fuller than the first one: it hosts 10 VMs with 4GB RAM each, so 40GB should be allocated for VMs only (if we don't consider the ballooning, active for the most).

I come to the conclusion that there is a well working self-balancing system that uses all the RAM for some reason when it's available, and free it when needed to other tasks, such as VMs.
 
I cut off the head of the snake: I tried, on a second server which had full RAM too, to create two new VMs, each with 4GB of RAM, and without ballooning.

The system lowered RAM consumption automatically and than raised it again. (see graph at 11:11 and 11:21)

View attachment 21815

This second server was fuller than the first one: it hosts 10 VMs with 4GB RAM each, so 40GB should be allocated for VMs only (if we don't consider the ballooning, active for the most).

I come to the conclusion that there is a well working self-balancing system that uses all the RAM for some reason when it's available, and free it when needed to other tasks, such as VMs.

This is in the back of my mind actually. Linux is infamous for not providing user sensible memory reporting. To consume all possible RAM is 'by design' on unix systems, however, to report it is a different matter. Linux systems free, VIRT, MEM%, buffers, cache are essentially used all the time.

But this is different than reporting free memory.
https://linux-audit.com/understanding-memory-information-on-linux-systems/

For some reason or other, this fluctuates more on proxmox. Typically, you'll never see that on a Linux system in use.

It is not a really big help but this command (shell on proxmox server) shows a sorted list of how memory is allocated

cat /proc/meminfo | sort -n -k2
what i see is as per below, where MemTotal is indeed the RAM i have installed in kB (/1024 /1024 for GB) but VmallocTotal is unknown to me since it is far bigger than anything i have configured or prepared for.


MemTotal: 82325012 kB
VmallocTotal: 34359738367 kB
 
Last edited:

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!