Host RAM usage vastly exceeding guest RAM

PW10

New Member
Aug 21, 2018
4
0
1
46
Dear all

On my cluster of two PVEs, one currently only hosts a single Windows 10 VM with 16GB RAM. The host itself has 64GB RAM. For some reason however, the host shows usage of up to 40GB of RAM.

See below screenshot. The dip on 2018-08-17 was caused by a reboot. In my estimate, usage would have increased further without the reboot.

(The other host in the cluster uses the expected amount of RAM given the RAM of the three VMs it hosts.)

I have no idea what causes this. Do you?

Screenshot_2018-08-21 PVE2-FNS - Proxmox Virtual Environment.png
 
The PVE host uses RAM also for disk cache, buffers and what the PVE itself uses. If you run ZFS it uses memory a lot. See where the memory goes, on the PVE host run command free, then examine further with top, htop etc.
 
Thanks for your reply, Tapio. Of course, PVE uses some of the RAM itself... but up to 24GB RAM for the PVE host seems excessive -- especially since I don't observe the same thing on the other host.

Anyway, below's what the console command top shows me (sorted by %MEM). I don't see where the 12GB RAM (of the 28GB used) go that are not related to the KVM process...

(Edit: Yes, I use ZFS.)

Code:
KiB Mem : 65748928 total, 36131032 free, 28093908 used,  1523988 buff/cache

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                      
 3654 root      20   0 17.022g 0.016t   8284 S  33.9 25.6   1121:50 kvm                                                                                                                          
 3366 www-data  20   0  546876 116748  13184 S   0.0  0.2   0:03.05 pveproxy                                                                                                                      
 9602 www-data  20   0  557484 116168  11176 S   0.0  0.2   0:02.13 pveproxy worker                                                                                                              
 6067 www-data  20   0  557452 116004  11056 S   0.0  0.2   0:01.24 pveproxy worker                                                                                                              
26270 www-data  20   0  557640 115660  10712 S   0.3  0.2   0:01.06 pveproxy worker                                                                                                              
 3303 root      20   0  539072 114988  12896 S   0.0  0.2   0:02.57 pvedaemon                                                                                                                    
10900 root      20   0  549716 112756   9380 S   0.0  0.2   0:00.14 pvedaemon worke                                                                                                              
10901 root      20   0  549524 112728   9380 S   0.0  0.2   0:00.20 pvedaemon worke                                                                                                              
10899 root      20   0  549460 112664   9380 S   0.0  0.2   0:00.11 pvedaemon worke                                                                                                              
11251 root      20   0  516284  84440   7204 S   0.0  0.1   0:00.30 pve-ha-crm                                                                                                                    
11211 root      20   0  515884  83832   7020 S   0.0  0.1   0:00.60 pve-ha-lrm                                                                                                                    
 3244 root      20   0  498376  79748  13184 S   0.0  0.1  10:35.74 pvestatd                                                                                                                      
 3254 root      20   0  504396  75860   8384 S   0.0  0.1   3:27.20 pve-firewall                                                                                                                  
 3173 root      rt   0  190140  69404  51472 S   0.7  0.1  40:48.72 corosync                                                                                                                      
 2973 root      20   0  630988  64296  48056 S   0.0  0.1   4:25.97 pmxcfs                                                                                                                        
 3389 www-data  20   0  278260  55336   9592 S   0.0  0.1   0:02.38 spiceproxy                                                                                                                    
10920 www-data  20   0  280728  50796   4808 S   0.0  0.1   0:00.04 spiceproxy work                                                                                                              
  995 root      20   0   70668  26760  26236 S   0.0  0.0   0:05.68 systemd-journal                                                                                                              
    1 root      20   0   57520   5696   3728 S   0.0  0.0   0:14.75 systemd                                                                                                                      
28361 root      20   0   95212   5652   4676 S   0.0  0.0   0:00.01 sshd                                                                                                                          
28572 root      20   0   56552   5508   4616 S   0.0  0.0   0:00.00 systemd                                                                                                                      
17768 postfix   20   0   83232   5384   4592 S   0.0  0.0   0:00.01 pickup
 
You can clear the cache on demand without rebooting:
Code:
sudo sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
 
There is 15 GB used for buffers and cache.
28 GB used + 15 GB buffers/cache + 36 GB free = all memory accounted for.

Right. And I wonder where the 28GB used come from, if top only shows around 28% used (which translates to roughly 18GB used, not 28GB used).

You can clear the cache on demand without rebooting:
Code:
sudo sync; echo 3 | sudo tee /proc/sys/vm/drop_caches

Cool, thanks for the command. Very helpful to avoid having to reboot...
 

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!