Wrong stats for memory and disk usage

tomx1

Active Member
Apr 26, 2018
12
0
41
43
We have a two node "Cluster" running only a single VM which is acting as Firewall. The VM is stored on ZFS with 50GB of size - the content gots replicated between those two nodes.


Problem 1

I noticed that the usage of memory and storage does not reflect reality. The VM itself has allocated 4GB RAM (no balloning). It is using only ~150M where 3,2G are cached:
Code:
              total        used        free      shared  buff/cache   available
Mem:           3.9G        147M        532M         39M        3.2G        3.5G
Swap:          4.0G         20M        4.0G
The Proxmox GUI shows a memory consumption of ~3,3G (As side note: Thats not really helpful cause it takes also the buffered/cached memory of the VM into account)
2018-07-16_105927-png.7842


However, thats not really the issue. But the hypervisor itself tells me that it is using ~13G of memory - why is that? (remember that only the a single VM with 4GB allocated memory is running on that node and the cluster itself)
2018-07-16_110112-png.7843



Problem 2

The ZFS storage is occupied with 92,41GB of data but the VM has only a 50GB harddisk and no Snapshots or Backups are made for this VM?

Summary:
2018-07-16_110510-png.7844

Content:
2018-07-16_110552-png.7845


Code:
root@host:~# zfs list -t all
NAME                                                  USED  AVAIL  REFER  MOUNTPOINT
fwdata                                               92.4G  81.0G    24K  /fwdata
fwdata/vm-100-disk-1                                 92.3G   133G  40.7G  -
fwdata/vm-100-disk-1@__replicate_100-0_1531731961__  1.97M      -  40.7G  -
 

Attachments

  • 2018-07-16_105927.png
    2018-07-16_105927.png
    5.4 KB · Views: 127
  • 2018-07-16_110112.png
    2018-07-16_110112.png
    10.9 KB · Views: 125
  • 2018-07-16_110510.png
    2018-07-16_110510.png
    1.9 KB · Views: 125
  • 2018-07-16_110552.png
    2018-07-16_110552.png
    7.2 KB · Views: 124
How do you want the host to know how guest is using its memory ? Cached or not, there's data in pages so for the host your vm uses 3.3GB, useful or not ..
 
Using qemu agent could probably do the trick, but don't mind... thats not really the problem here.
 
Problem1:

zfs takes half of your memory by default: ~16GB/2 = ~8GB + ~3.5GB + ~1-2GB for the services/daemons/etc. = ~12.5-13.5GB

Problem2:

The ZFS storage is occupied with 92,41GB of data but the VM has only a 50GB harddisk and no Snapshots or Backups are made for this VM?
This
Code:
fwdata/vm-100-disk-1 92.3G 133G 40.7G - 
fwdata/vm-100-disk-1@__replicate_100-0_1531731961__ 1.97M - 40.7G -

says you have 1 snapshot (for the replication) and both the disk and the snapshot need 40.7G (see the 'refer' column)
 
dcsapak wrote: zfs takes half of your memory by default - is this really happening ? I know zfs uses a lot of ram but half of what you have or you were just referring to Tomx1's particular case.

In my case storage replication takes about double the size of replicated VM - see this post: https://forum.proxmox.com/threads/storage-replication.44787/#post-216155 - some users suggested to do ashift = 9 to waste less space.
 
dcsapak wrote: zfs takes half of your memory by default - is this really happening ? I know zfs uses a lot of ram but half of what you have or you were just referring to Tomx1's particular case.
no it is really 50% by default, for more info and how to limit this see https://pve.proxmox.com/wiki/ZFS_on_Linux#_limit_zfs_memory_usage and the zfs

In my case storage replication takes about double the size of replicated VM - see this post
yes you also have a snapshot which takes up space
 
As only the delta is synced to the standby node I did not thought that it will take the hole disk space twice... hmm

maybe that is the snapshot that is being synced to the target ?
 

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!