Doesn't free RAM after run backup

Amonal86

New Member
Mar 12, 2024
3
1
3
Hello,

I have a problem with a host proxmox 8.0.3
  • RAM usage is 96% (60,01 GiB of 62.58 GiB)
  • 4 Total VMs KVM = 46 GB assigned

I try to stop all VMs and restart host to free RAM. But after run a backup and it finish, problem persist again.
I use external Proxmox backup server.

Code:
~# free -h
               total        used        free      shared  buff/cache   available
Mem:            62Gi        60Gi       2.3Gi        73Mi       165Mi       1.9Gi
Swap:             0B          0B          0B
root@pve101:~#

Do you have any idea about this?
 
Last edited:
  • Like
Reactions: Kingneutron
Hi,
what you might be seeing is the ZFS Arc. It's a ZFS's version of a cache, but it is seen by the operating system as application memory. We are currently working to display this a bit better, but it may take a while to land [0]. You can check how much of your current memory is being consumed by the arc with the arcstat command. It will shrink if more memory is needed by other applications.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=1454

Edit: Forgot to add the link to the issue
 
Last edited:
thank you for your replies. Yes, I will go to update Proxmox to night.

About arcstat command:

Code:
:~# arcstat
    time  read  miss  miss%  dmis  dm%  pmis  pm%  mmis  mm%  size     c  avail
09:21:42    14     0      0     0    0     0    0     0    0   26G   26G   788M
 
In the arcstat output, you can look at the size property, in your case 26G. It tells you the currently used memory for the arc. Like any other cache, it will use the ram that is currently unused and will give it back if it is needed.
While this is usable RAM, you shouldn't starve it down too much, since that will degrade the performance of your zfs raid. You can look at our wiki for some recommendations on how much memory should be available for the arc [0].

[0] https://pve.proxmox.com/wiki/ZFS_on_Linux#sysadmin_zfs_limit_memory_usage
 
Nice!, I ajusted ARC Max for 10GB.

Code:
echo "$[10 * 1024*1024*1024]" >/sys/module/zfs/parameters/zfs_arc_max

Normally during backup a VM was blocked. I wait to night to check it again. I will go to reply with results.
 
  • Like
Reactions: Kingneutron
Hi,
what you might be seeing is the ZFS Arc. It's a ZFS's version of a cache, but it is seen by the operating system as application memory. We are currently working to display this a bit better, but it may take a while to land [0]. You can check how much of your current memory is being consumed by the arc with the arcstat command. It will shrink if more memory is needed by other applications.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=1454

You might want to take a look at my tweaked htop config, it would probably cost you basically nothing to prepopulate it in /root/.config for the next PVE ISO rev. Displays hostname, load average, CPU temp, RAM + swap usage, ZFS ARC usage and uptime. I use ' htop -d 22 ' so it doesn't update every second.

Restore to (/root or /home/userid) .config/htop
https://github.com/kneutron/ansitest/blob/master/proxmox/dot-config-htop-htoprc
 

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!