[SOLVED] High RAM consumption

otoman

Member
Mar 25, 2022
35
4
8
Hello,

I'm not sure if this is normal. PVE is reporting almost 50% RAM usage (out of 56 GiB) while all I have running are 2 lxc containers which combined have under 1 GB of RAM allocated. I do have a Windows 10 VM set up but it is stopped and its RAM is from 8 to 24 GB. When I use top to see the memory usage, my top process uses 0.3% and the rest are below that, most of them coming to 0.0. Here's a screenshot showing the summary.
1648851802457.png

My OS storage is a 240 GB NVME SSD and I also have a ZFS on RAID 10 of 4x8TB WD GOLD drives. I read somewhere that ZFS requires 4 GB + 1 GB per 1 TB of disk storage. Since I'm still learning everything, I followed a guide which had me create several ZFS "volumes" (I'm not sure if that's what they are) as folders for different storage types. They all use a single zpool. I created them via Web UI under Datacenter -> Storage -> Add option. I don't have a problem with PVE using as much RAM as it needs to optimize performance but my concern is this will prevent me from running multiple VMs in case the system doesn't reduce usage.
Can I get an overview of what exactly is using all this RAM other than in top?

Thanks in advance!
 
Wow, this was fast! :-D

Thanks a lot. Will the cache get reduced if ever needed automatically? I'm fine with utilizing RAM I don't currently need for other things, I just don't want it to stop me from running VMs when I need them.
 
The ARC will shrink again when the RAM is needed by other processes. But it isn't as fast as dropping the usual linux caches (and if you run free -h ARC is also counted as "used" only and not as "buff/cache") so you maybe still encounter OOM situations. If that is the case you should limit the ARC.
 
I just wanted to post my similar experience and say thanks for the above posts. I have 48 gigs of RAM on server and 42 gigs were reporting as in use.

500 VM - Allocated 8 - Using 6.3 (Balloon = No)
501 VM - Allocated 8 - Using 2.8 (Balloon = Yes)
502 VM - Allocated 2 - Using 0.8 (Balloon = Yes)
503 CT - Allocated 12 - Using 2.6 (Balloon = N/A)

So the above VM's/CT were actually using 12.5 gigs with 30gb allocated for allowed use. The machine has 2TB worth of ZFS in total.

Using the command below I limited ZFS arc RAM max to 6gb:

echo "$[6 * 1024*1024*1024]" >/sys/module/zfs/parameters/zfs_arc_max

Within about 10 seconds this changed the system overall RAM usage to 25gb instead of 42gb.

To make the change permanent, I then had to create /etc/modprobe.d/zfs.conf with the following inside:

options zfs zfs_arc_max=6442450944

(hopefully this was correct, because the zfs.conf file did not exist in that folder)

Reference from above and https://pve.proxmox.com/wiki/ZFS_on_Linux#sysadmin_zfs_limit_memory_usage
 
  • Like
Reactions: thebigbo

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!