Virtual machine - RAM used 95%

Rathorian

New Member
May 18, 2020
5
0
1
37
Good morning all,

I am using Proxmox 6.2 on my server.
I currently have 2 VM's with Debian 10 installed and the "qemu-guest-agent" package installed and activated.

One of my VM's with 8G of allocated RAM, it uses a lot of cached RAM memory.

Is it normal to have in the Proxmox interface, all the RAM of my VM used when it is false. My VM actually consumes 1.1G and 6.7G in cache.
It is not logical supervision. We can't trust the news to monitor our services.


conso.png

ram.png

Bash:
              total        used        free      shared  buff/cache   available
Mem:           7977        1134         120          13        6721        6532
Swap:             0           0           0

Do you have an idea to solve the problem?

thank you so much
 
Last edited:
Good morning all,

I am using Proxmox 6.2 on my server.
I currently have 2 VM's with Debian 10 installed and the "qemu-guest-agent" package installed and activated.

One of my VM's with 8G of allocated RAM, it uses a lot of cached RAM memory.

Is it normal to have in the Proxmox interface, all the RAM of my VM used when it is false. My VM actually consumes 1.1G and 6.7G in cache.
It is not logical supervision. We can't trust the news to monitor our services.


View attachment 17363

View attachment 17364

Bash:
              total        used        free      shared  buff/cache   available
Mem:           7977        1134         120          13        6721        6532
Swap:             0           0           0

Do you have an idea to solve the problem?

thank you so much

Can you please put the minimum memory as 4GB and Memory as 8GB and see the changes
 
The memory display on the proxmox size, is usage from host view. (your vm really take 7,66GB from hypervisor memory, not available for other vms)
Hi, so is that normal for you?

Even if I understand your point of view, it is absolutely not logical. We are supposed to be able to check the resources used by each VM from the Proxmox interface and in this case what we see is not really memory used but only cached memory.

Can you please put the minimum memory as 4GB and Memory as 8GB and see the changes
I tried it but it doesn't work better, I still have the same problem. Despite having activated it, a complete restart of Proxmox and verification over more or less 24 hours, I again have 95% of RAM usage used.
 
Hi, so is that normal for you?

Even if I understand your point of view, it is absolutely not logical. We are supposed to be able to check the resources used by each VM from the Proxmox interface and in this case what we see is not really memory used but only cached memory.


I tried it but it doesn't work better, I still have the same problem. Despite having activated it, a complete restart of Proxmox and verification over more or less 24 hours, I again have 95% of RAM usage used.

Can you share the following from the shell

qm monitor <vmid> and press enter on a new prompt enter the following

info memory_size_summary
info memdev

Just share the output to debug
 
Can you share the following from the shell

qm monitor <vmid> and press enter on a new prompt enter the following

info memory_size_summary
info memdev

Just share the output to debug

info memory_size_summary :
Bash:
base memory: 8589934592
plugged memory: 0

info memdev :
Bash:
memory backend: pc.ram
  size:  8589934592
  merge: true
  dump: true
  prealloc: false
  policy: default
  host nodes:
 
info memory_size_summary :
Bash:
base memory: 8589934592
plugged memory: 0

info memdev :
Bash:
memory backend: pc.ram
  size:  8589934592
  merge: true
  dump: true
  prealloc: false
  policy: default
  host nodes:


I asked in previous post to set memory as 4GB (minimum) and maximum as 8GB
in such situations, the memory would look like this
observe the ram node0 and ram node1


qm> info memdev
memory backend: ram-node1
size: 4294967296
merge: true
dump: true
prealloc: false
policy: default
host nodes:
memory backend: ram-node0
size: 4294967296
merge: true
dump: true
prealloc: false
policy: default
host nodes:

qm> info memory_size_summary
base memory: 8589934592
plugged memory: 0

Please go to your VM>Hardware>Memory>click Advanced>

Set memory as 8GB and minimum as 4GB
and stop/start vm again
 
I asked in previous post to set memory as 4GB (minimum) and maximum as 8GB
in such situations, the memory would look like this
observe the ram node0 and ram node1


qm> info memdev
memory backend: ram-node1
size: 4294967296
merge: true
dump: true
prealloc: false
policy: default
host nodes:
memory backend: ram-node0
size: 4294967296
merge: true
dump: true
prealloc: false
policy: default
host nodes:

qm> info memory_size_summary
base memory: 8589934592
plugged memory: 0

Please go to your VM>Hardware>Memory>click Advanced>

Set memory as 8GB and minimum as 4GB
and stop/start vm again
I did it but it didn't take it into account during the total reboot of Proxmox.

I just tried again, but it still doesn't take it into account

conso.png
 
Thats not really an issue. Buffered RAM on the Guest is used RAM on the Linux host. So it works as intended.

Maybe we should start an feature request to add more infos to the ram usage graph.
I for example would like something like this...
ram5.jpg
...instead of that:
ram2.jpg

There are 3 annoying cases where you can't trust the default graphs:
1.) If you use ballooning with different min/max RAM values. My VM for example got 8GB max and 4GB min RAM. From 11th to 12th dec the used RAM is stagnating at 4G and you think another 4GB are free and can be used but because ballooning kicked in the useable RAM was limited to 4GB. So at that time the VM used 4GB of 4GB and not 4GB of 8GB what the default graph is telling you. So you think half of the RAM is free but in reality it nearly 100% used.
Because of that I would like something like my red "N/A" graph what will tell you how much of the RAM is "blocked" by ballooning and not available anymore for the guest.

2.) The second thing is that you can't see how much of the used RAM is used for buffering/caching. Everyone is confused because of that. From the hosts point of view you want to see the total amount of RAM used by the guest, like the default graph is showing it for Linux VMs.
From the guests point of view you don't care how much RAM is used in total, because most OSs will grab as much RAM as possible for buffering/caching and the total RAM usage is always above 90%, whatever RAM size you choose. Here it would be great to see how much of the used RAM is used for unimportant stuff like caching/buffering what could be freed easily if a service needs more RAM.
So I think it would be nice to differentiate the used RAM like in my edited graph where light blue is the total RAM including buffer/cache (like default) but there is also a dark blue graph which only shows RAM actively used by the system and user processes. So its basically the used RAM without cache/buffer, so you can see early if a guest gets short on memory to increase it. If a OS only gives information on one of the two things, then just show that one thing. But in that case you atleast know if it is with or without buffering/caching.

3.) Not all guest OSs are handled the same...
For Linux "used" is everything incl. buffered/cached RAM.
For Win10 "used" is only RAM used by the system and programs. RAM used for Caching isn't take into account.
For Unix (atleast my FreeBSD/OPNsense) there is no way to get usefull information. The virtio ballooning implementation of FreeBSD isn't reporting RAM stats so Proxmox falls back to the kvm process that VM is using. So "used" RAM is the amount of reserved RAM by that process. The problem is that this process reserves as much RAM as possible. If you give that VM 12GB RAM, KVM will reserve and block 11.6GB of that RAM, even if the guest is only using 400MB of RAM including buffering and caching. So 11.2GB of RAM are totally wasted and not usable by other VMs or the guest.
 
Last edited:
  • Like
Reactions: creamers

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!