[SOLVED] BUG memory usage ?

daruom13

Member
Aug 1, 2020
31
2
13
38
Hello,

I have the impression that there is a problem with the analysis of VM resources.

When I connect to the Proxmox interface, my machine seems to have consumed all the RAM.
RAM web interface.PNG

On the other hand, when I run the top command from the VM, the RAM is not overloaded.
RAM top command.PNG

In addition, the VM in question is a Pfsense. At the beginning, I had put 4gb of RAM. Today, I am at 24gb. When I restart the VM, it consumes around 4go. But after 24 hours, it is already at 70%.

Does anyone have an explanation to this ?
 
The RAM usage display counts all "physical" (emulated) RAM the virtual machine touches. A high utilization can be caused by caching or unusual access patterns dirtying too much RAM. In general, give a VM only as much RAM as you want it to use.

Also, in the GUI, we cannot determine how much of RAM is used in which way (VM guest is opaque to us), so we can only show it this way.
 
The RAM usage display counts all "physical" (emulated) RAM the virtual machine touches. A high utilization can be caused by caching or unusual access patterns dirtying too much RAM. In general, give a VM only as much RAM as you want it to use.

Also, in the GUI, we cannot determine how much of RAM is used in which way (VM guest is opaque to us), so we can only show it this way.

Hello and thank you for your feedback.

So if I understood correctly, the display on the web interface does not really represent the consumption of the VM.

For the part "caching or unusual access patterns dirtying too much RAM", is this problematic?

If so, is there a way to find the origin?

"In general, give a VM only as much RAM as you want it to use.". At the beginning, that's what I did, it was precisely following this problem that I increased it. What surprises me is that after restarting the VM, it resumes a normal load.
 
For the part "caching or unusual access patterns dirtying too much RAM", is this problematic?

If so, is there a way to find the origin?
No, not problematic, that's just the way modern operating systems work (and on bare-metal that's exactly how you'd want it). The 'balloon' driver exists for that exact reason, so a VM can share it's memory better with the host - but that requires support in the guest, which might not exist for pfSense (haven't looked into it).

Think of it this way: The guest VM believes that it is running on a physical computer. Why should it not use all the available RAM? Now, that of course doesn't mean that it's using all the RAM at once, but since on bare-metal there is no need to share RAM with anyone, there's usually no interface to say "hey I don't need that memory anymore". It just uses the next block of memory and declares the previous one "unused" to itself. But from outside the VM, both blocks now appear used.

"In general, give a VM only as much RAM as you want it to use.". At the beginning, that's what I did, it was precisely following this problem that I increased it. What surprises me is that after restarting the VM, it resumes a normal load.
Monitor your RAM from inside the VM. If the it says it's fine there, you're good and don't need to give it more.
 
  • Like
Reactions: daruom13
No, not problematic, that's just the way modern operating systems work (and on bare-metal that's exactly how you'd want it). The 'balloon' driver exists for that exact reason, so a VM can share it's memory better with the host - but that requires support in the guest, which might not exist for pfSense (haven't looked into it).

Think of it this way: The guest VM believes that it is running on a physical computer. Why should it not use all the available RAM? Now, that of course doesn't mean that it's using all the RAM at once, but since on bare-metal there is no need to share RAM with anyone, there's usually no interface to say "hey I don't need that memory anymore". It just uses the next block of memory and declares the previous one "unused" to itself. But from outside the VM, both blocks now appear used.


Monitor your RAM from inside the VM. If the it says it's fine there, you're good and don't need to give it more.

perfect. Thank you for all this information.

Cordially.
 

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!