ZFS Cache Not being Configured

nanaksingh

New Member
Jun 19, 2023
4
1
3
I have 64 GB ram in my server. As ZFS is configured to utilize maximum RAM, I tried to reduce with following config in /etc/modprobe.d/zfs.conf to around 8 GB

options zfs zfs_arc_min=8388608
options zfs zfs_arc_max=8388608

but still zfs was using 28 GB.
 
"zfs_arc_min" needs to be less than "zfs_arc_max" or ZFS will ignore them and use the defaults (new 10% of hosts RAM, old 50%). Also don't forget to rebuild your initramfs or those ZFS options won't be applied.
 
  • Like
Reactions: nanaksingh
According to documentation, the ARC max is now 10% of physical memory with a hard max of 16 GiB as of PVE version 8.1.

@nanaksingh are you using a recent version of PVE? That 28 GiB doesn't seem possible according to the documentation if your using a current version of PVE:
https://pve.proxmox.com/wiki/ZFS_on_Linux#sysadmin_zfs_limit_memory_usage

Also, ARC should back off down to zfs_arc_min if memory is needed. If you have a ton of memory, and the min is too high, I use this calculation:
2 GiB + 1 GiB/TiB
Just calculate how much space the ZFS volume is in TiB to get the second part of that calculation.

This should make the min more realistic for large amounts of physical memory when the default min is way too high.
 
  • Like
Reactions: nanaksingh
I am using 7.4, I will be updating to 8


Thanks guys for pointing that out. I had not read the new documentation.
 
Last edited:
  • Like
Reactions: utkonos

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!