Page 1 of 1

arc_max problem

PostPosted: Sun Feb 04, 2018 11:45 am
by e8vww
The automatic settings aren't working. A swap file is still being created no matter how much ram I add.

I made the file at /etc/zfs/zsysctl.conf, plain text with the only line being kstat.zfs.darwin.tunable.zfs_arc_max=19327352832. Rebooted and did a test copy. Afterwards--- kstat.spl.misc.spl_misc.os_mem_alloc: 23854088192

Where am I going wrong? Thanks all for your help.

Edit: I tried following the instructions at https://openzfsonosx.org/wiki/Performance to release memory.

sudo sysctl -w kstat.zfs.darwin.tunable.zfs_arc_max=<size of arc in bytes> resulted in sysctl: illegal option -- ?

sudo sysctl -w kstat.spl.misc.spl_misc.simulate_pressure=<amount of ram to release in bytes> results in sysctl: unknown oid 'kstat.spl.misc.spl_misc.simulate_pressure'

What is the arc meta limit? There is no explanation on https://openzfsonosx.org/wiki/Memory_utilization

Re: arc_max problem

PostPosted: Thu Feb 08, 2018 3:04 am
by Brendon
ARC max is the maximum size of the ARC data.

However, and this has been answered before, the memory allocator is NOT 100% space efficient, not even close. There is potentially 30+% overhead in data structures and fragmentation on top of the desired ARC size. This is the difference that you are seeing.

Cheers
Brendon

Re: arc_max problem

PostPosted: Thu Feb 08, 2018 4:14 am
by lundman
swap file creation? Are we using the creation of a swapfile as indication of low memory?


I think the sysctl changed, its

kstat.spl.misc.spl_misc.spl_spl_free_manual_pressure: 0
kstat.zfs.darwin.tunable.zfs_arc_max: 0

Re: arc_max problem

PostPosted: Mon Feb 12, 2018 8:33 am
by e8vww
Brendon wrote:ARC max is the maximum size of the ARC data.

However, and this has been answered before, the memory allocator is NOT 100% space efficient, not even close. There is potentially 30+% overhead in data structures and fragmentation on top of the desired ARC size. This is the difference that you are seeing.

Cheers
Brendon


Thanks, the problem was that textedit added .txt as a hidden extension.

lundman wrote:swap file creation? Are we using the creation of a swapfile as indication of low memory?


I think the sysctl changed, its

kstat.spl.misc.spl_misc.spl_spl_free_manual_pressure: 0
kstat.zfs.darwin.tunable.zfs_arc_max: 0


It works now thanks. I find that once a swapfile is created it never releases again and the system just slows down in general.