Proxmox sees OPNsense as consuming 5.5 GB of RAM while the VM sees itself at only 350 MB

beisser

Active Member
Feb 21, 2023
165
48
28
hi guys,

first time post here.

i have a weird issue where proxmox 7.3.6 sees my OPNsense 23.1.3 VM consume 5.5 GB of ram while the VM itself sees only 350 MB ram consumption.

maybe someone has an idea whats going on or where i can dig to find more

Code:
agent: 1
balloon: 0
boot: order=scsi0;ide2;net0
cores: 4
cpu: host
ide2: local:iso/OPNsense-23.1-OpenSSL-dvd-amd64.iso,media=cdrom,size=1600298K
memory: 8192
meta: creation-qemu=7.1.0,ctime=1676754914
name: opnsense
net0: virtio=62:47:1A:9B:25:D2,bridge=vmbr0
net1: virtio=8E:81:36:79:59:88,bridge=vmbr1
numa: 0
onboot: 1
ostype: l26
scsi0: local-lvm:vm-252-disk-0,discard=on,iothread=1,replicate=0,size=40G,ssd=1
scsihw: virtio-scsi-single
smbios1: uuid=ca2443cf-50a4-4f08-8e96-a565405c1e2d
sockets: 1
startup: order=1
vga: qxl
vmgenid: 4704df54-c22b-4a87-bbfb-9811e43815f9
 

Attachments

  • 2023-03-13 15_25_43-Clipboard.png
    2023-03-13 15_25_43-Clipboard.png
    124.9 KB · Views: 15
  • 2023-03-13 15_26_25-Dashboard _ Lobby _ OPNsense.fritz.box.png
    2023-03-13 15_26_25-Dashboard _ Lobby _ OPNsense.fritz.box.png
    95 KB · Views: 14
  • 2023-03-13 15_28_42-DEL2754 - VMware Workstation 17 Player.png
    2023-03-13 15_28_42-DEL2754 - VMware Workstation 17 Player.png
    173.4 KB · Views: 13
This is a really common topic, so the search function should yield you plenty of hits regarding this.

The thing is that since 'unused RAM is wasted RAM', every OS is using their 'free' RAM for caching. The Hypervisor, though, only looks at the VM 'from the outside', and all it sees is that the VM has 'touched' most of the assigned RAM.

Kind regards,
Benedikt
 
so if i understand you correctly, proxmox sees the memory as beeing used because it has been touched already, even if the os inside the vm sees it as not used for anything?
at least thats how i interpret the top-output which i attached as screenshot.
according to that 6805MB of the 8GB of memory are completely unused.

i apologize if i sound stupid, im just trying to wrap my head around this as other virtual machines running Debian-/Kali-/Redhat-Linux or Windows 11 on the same host do not behave this way.

maybe this is something freebsd specific.
 

Attachments

  • 2023-03-13 15_41_12-pve - Proxmox Virtual Environment.png
    2023-03-13 15_41_12-pve - Proxmox Virtual Environment.png
    37 KB · Views: 6
interestingly tonight my opnsense vm went haywire (something crashed in it) and used up all its available memory plus all swap configured inside the vm, while proxmox still only shows it using 6.5 out of 8 GB of ram (the vm shows full 8 GB ram and full 8GB of swap used).

Code:
last pid: 89872;  load averages:  0.70,  0.80,  0.89                  up 0+19:59:46  08:32:50
1474 processes:4 running, 1469 sleeping, 1 zombie
CPU:  5.2% user,  0.0% nice, 10.2% system,  0.2% interrupt, 84.4% idle
Mem: 3992M Active, 4096B Inact, 2495M Laundry, 1250M Wired, 704M Buf, 30M Free
Swap: 10G Total, 10G Used, K Free, 100% Inuse, 10M In, 852K Out

i wonder whats causing the discrepancy.
 

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!