PVE system process memory usage

zeha

Renowned Member
Oct 11, 2016
34
5
73
Hi,

I'm running PVE on RAM-constrained hardware - just 4GB, non-upgradable. Naturally, I want most of the RAM to be used for (qemu) VMs.
Judging from top(1) output, these pve processes seem to use "lots" of RES memory, while maybe not doing that much with only 2 VMs setup?

Code:
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
2895443 www-data  20   0  366912 143608  12152 S   4.8   3.6   0:15.20 pveproxy worker
2897130 www-data  20   0  366704 142624  11432 S   0.0   3.6   0:21.41 pveproxy worker
2903390 www-data  20   0  361716 134492   8256 S   0.0   3.4   0:02.37 pveproxy worker
2898965 root      20   0  360212 132780   7976 S   0.0   3.3   0:11.37 pvedaemon worker
2898975 root      20   0  360244 132356   7612 S   4.8   3.3   0:11.14 pvedaemon worker
2898968 root      20   0  360240 132268   7564 S   0.0   3.3   0:08.09 pvedaemon worker
   1292 www-data  20   0  353132 127216   2400 S   0.0   3.2   0:51.95 pveproxy
2898960 root      20   0  351572 126736   3348 S   0.0   3.2   0:00.10 pvedaemon
   1368 root      20   0  331396 100324   1888 S   0.0   2.5   2:40.76 pvescheduler
   1248 root      20   0  336672 100040   3536 S   0.0   2.5   2:24.46 pve-ha-crm
   1305 root      20   0  336132  99192   3196 S   0.0   2.5   3:56.67 pve-ha-lrm
    989 root      20   0  275996  89384   5900 S   0.0   2.2  90:08.20 pve-firewall
    994 root      20   0  274284  88276   6484 S   1.9   2.2 121:42.38 pvestatd

To me this looked a bit like, maybe the perl code caches something on startup or allocs some read buffer or something in advance. I don't quite understand Perl (its been a while...), but these numbers seem ... interesting:

"Empty" perl: uses 5M RES:
Code:
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
2913262 ch        20   0   10732   4800   4380 S   0.0   0.1   0:00.00 perl

A perl that only did "use PVE::Tools" goes to 18M RES:
Code:
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
2911974 ch        20   0   23000  17940   5932 S   0.0   0.4   0:00.79 perl

A perl that did "use PVE::Tools; use PVE::RPCEnvironment;" jumps to 47M RES:
Code:
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
2911974 ch        20   0   62548  47044  11044 S   0.0   1.2   0:02.29 perl

:-O

Chris
 
While I do not see an actual question, I can anyway only say, that you could disable: pve-ha-crm and: pve-ha-lrm, if you are not using High Availability, to save some additional megabytes. :cool:
 
Turned off pve-ha-crm and pve-ha-lrm now, thanks!

There was no "actual question" except an implied "does someone who knows the code want to look at it?".
 
Last edited:
It's slowly starting to swap stuff out, sure. But thats not really the point.

A "fresh small install" PVE 7.3 now uses ~1.6GB before any VMs are running. That's just a lot, and a lot more than the allocation guidelines suggest.
 
It's slowly starting to swap stuff out, sure. But thats not really the point.
I just suggested swapping quicker. I though it might help free memory for your VMs.
A "fresh small install" PVE 7.3 now uses ~1.6GB before any VMs are running. That's just a lot, and a lot more than the allocation guidelines suggest.
Which guidelines? It's below the 2GB recommended amount according to the manual, but the manual claims it can be run in 1GB. I'm not sure what generic parts of Debian GNU/Linux are included in that number.

EDIT: I have a Proxmox VE 7.3 (inside a VM) without VMs and with all containers stopped it uses 932MiB of memory. I did disable pve-ha-crm and pve-ha-lrm and use ext4/LVM-thin.
 
Last edited:
It's slowly starting to swap stuff out, sure. But thats not really the point.

A "fresh small install" PVE 7.3 now uses ~1.6GB before any VMs are running. That's just a lot, and a lot more than the allocation guidelines suggest.
Just installed a PVE on a VM:

Code:
root@pve:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       929Mi       804Mi        28Mi       240Mi       859Mi
Swap:          1.9Gi          0B       1.9Gi
 

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!