setting vfs.zfs.arc_max Invalid Arguement (trying to benchmark)

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
EDIT I FOUND FIX / RESOLVED: the issue was that i was not using the proper "size" / multiple , ie this works:
sysctl vfs.zfs.arc_max=8226053120
however i cant figure out a number below this 8gb that will take (keeps saying invalid arg) any ideas? id like to have no or very little arc set for my benchmarking.

it does seem like the you have to use multiples of 1024 (ie your number must be evenly divisible by 1024) , please correct me if im wrong, but i still cant get below the 8g above
------

to be clear, i would never mess with these settings on my final system. however for the past week (and a few more weeks), im just testing various disk layouts and configs with FN.

Im trying to benchmark different disk layouts, however as i have 128g of memory, almost all of my tests results are from cache.

Im trying to set my arc to 4gb, i cant find info in the fourms on how to do this via the CLI (which i read will make the change instantly).

what am i doing wrong (i keep getting invalid arg)? Or is there a better way i should be disabling cache for my benchmarking (other than pulling out ram, as i have 32gb sticks) thanks

root@freenas:~ # sysctl vfs.zfs.arc_max=4808424960
vfs.zfs.arc_max: 65808424960
sysctl: vfs.zfs.arc_max=4808424960: Invalid argument
root@freenas:~ # sysctl vfs.zfs.arc_max=65808424960
vfs.zfs.arc_max: 65808424960 -> 65808424960
root@freenas:~ # sysctl vfs.zfs.arc_max=6808424960
vfs.zfs.arc_max: 65808424960
sysctl: vfs.zfs.arc_max=6808424960: Invalid argument
root@freenas:~ # sysctl vfs.zfs.arc_max=4294967296
vfs.zfs.arc_max: 65808424960
sysctl: vfs.zfs.arc_max=4294967296: Invalid argument
root@freenas:~ # sysctl vfs.zfs.arc_max=4G
sysctl: invalid uint64_t '4G'
root@freenas:~ # sysctl vfs.zfs.arc_max="4294967296"
vfs.zfs.arc_max: 65808424960
sysctl: vfs.zfs.arc_max=4294967296: Invalid argument
root@freenas:~ # sysctl vfs.zfs.arc_max=4096M
sysctl: invalid uint64_t '4096M'

EDIT: AutoTune is disabled (and has never been turned on) , (the reason im not using tunables in the GUI is im trying to avoid needing to reboot each time)
 
Last edited:

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
sorry, i should have updated. yes i did get it.

It seems, based upon your physical ram, there is only so low you are able to manually set your arc to (it seems the lowest you can mnaully set your arc to is exactly 1/8th of your physical/hw memory)

ie, with 128gb of ram, no matter what i try, 16gb is the lowest arc i can set. via:

vfs.zfs.arc_max=16606053120
(16gb)

(pretty cool in that it takes affect immediately, and of course does not persist through reboots- great for the bench-marking ive been doing)

so if you need to go lower on the arc, either remove ram, or an easier way to reduce total ram is via this:
hw.physmem=4294967296
(sets your ENTIRE ram to 4gb, or whatever number you put there , you must reboot for this to take affect, so i do this via the tunables gui, so i can easily delete it later, when im finished testing)

with lower ram , you can then set a much lower arc (it seems the lowest you can go is 1/8th of your current physical/hw memory).

tks
 
Top