[SOLVED] zfs_arc_max / /etc/modprobe.d/zfs.conf seems to be ignored in Proxmox 6.0

Asano

Well-Known Member
Jan 27, 2018
55
10
48
43
Code:
> cat /sys/module/zfs/version
0.8.1-pve1

> cat /etc/modprobe.d/zfs.conf
options zfs zfs_arc_max=8589934592

> update-initramfs -u

> reboot

> cat /sys/module/zfs/parameters/zfs_arc_max
0

> awk '/^c/ { print $1 " " $3 / 1048576 }' < /proc/spl/kstat/zfs/arcstats
c 32138
c_min 2008.62
c_max 32138
compressed_size 61.1318

Not sure what I'm doing wrong. I tried the reboot and update-initramfs -u two times...
And as far as I can recall I did exaclty the same with Proxmox 5 and there it always worked so maybe it is a 6.0 problem?

Anyways, any help would be appreciated!
 
This works on my machine. What was the output of the update-initramfs -u?
 
This works on my machine. What was the output of the update-initramfs -u?

When I rerun it the output is
Code:
update-initramfs: Generating /boot/initrd.img-5.0.15-1-pve

Without anything else and I'm quite sure it was the same when I ran it the first time.

Meanwhile I tried to set the size on the fly with
Code:
> echo "8589934592" > /sys/module/zfs/parameters/zfs_arc_max
> echo 3 > /proc/sys/vm/drop_caches

This had the somewhat strange effect that `cat /sys/module/zfs/parameters/zfs_arc_max` actually had the correct size but
`awk '/^c/ { print $1 " " $3 / 1048576 }' < /proc/spl/kstat/zfs/arcstats` the stats from above. Now (and after the machine joined a cluster) the stats are as expected:
Code:
> awk '/^c/ { print $1 " " $3 / 1048576 }' < /proc/spl/kstat/zfs/arcstats
c 8192
c_min 2008.62
c_max 8192
compressed_size 7119.07

When I look at the "Memory usage" graph of the machine it looks like the memory usage dropped down to the expected amount at the moment the machine joined the cluster but I cannot say for sure. For the moment this is resolved for me since one way or another the machine will respect the max size. Worst case is I have to set it on the fly after a reboot and wait some time. I'm not sure if it's worth to investigate this further though it is a bit odd.
 
there is a hint a little bit higher up on the same page that links to the boot loader section ;)
 
I followed this steps to edit the max zfs ram and after that i restarted the machine.
Now my system / gui does not boot.

Commands used:
nano /etc/modprobe.d/zfs.conf
options zfs zfs_arc_max=8589934592

update-initramfs -u
reboot




#Proxmox Latest version
#OVH dedicated server
 
Last edited:
Managed to solve by adding the "5.4.44-1-pve" version to the command...

Commands used:
nano /etc/modprobe.d/zfs.conf

#Max Ram Used by ZFS
options zfs zfs_arc_max=8589934592
#Min Ram Used by ZFS
options zfs zfs_arc_min=1073741824


update-initramfs -k 5.4.44-1-pve -u
reboot


//solved
 

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!