sysctl configs

Developer discussions.

sysctl configs

Postby haer22 » Thu May 08, 2014 8:33 am

Where can I find a explanation of "all" configurables for ZFS, in particular the OSX configurables.

I have not tweaked anything after the install so it looks like below. Seems like I should change ifs.arc_min/max to something > 0. Does it mean I have no cache at the moment?

My minMac is an Core i5 with 16 GB and any suggestions ae welcome.

Code: Select all
[ihecc:~] root# sysctl -A | & grep -i zfs
vfs.zfs has 7 mounted instances
vfs.generic.nfs.client.access_dotzfs: 1
zfs.arc_max: 0
zfs.arc_min: 0
zfs.arc_meta_used: 48378872
zfs.arc_meta_limit: 805306368
zfs.l2arc_write_max: 8388608
zfs.l2arc_write_boost: 8388608
zfs.l2arc_headroom: 2
zfs.l2arc_feed_secs: 1
zfs.l2arc_feed_min_ms: 200
zfs.l2arc_noprefetch: 1
zfs.l2arc_feed_again: 1
zfs.l2arc_norw: 0
zfs.anon_size: 180224
zfs.anon_metadata_lsize: 0
zfs.anon_data_lsize: 0
zfs.mru_size: 765544448
zfs.mru_metadata_lsize: 16189952
zfs.mru_data_lsize: 739802624
zfs.mru_ghost_size: 308169216
zfs.mru_ghost_metadata_lsize: 106973696
zfs.mru_ghost_data_lsize: 201195520
zfs.mfu_size: 3606528
zfs.mfu_metadata_lsize: 738304
zfs.mfu_data_lsize: 2196480
zfs.mfu_ghost_size: 70144
zfs.mfu_ghost_metadata_lsize: 65536
zfs.mfu_ghost_data_lsize: 4608
zfs.l2c_only_size: 0
zfs.vnop_osx_debug: 0
zfs.vnop_ignore_negatives: 0
zfs.vnop_ignore_positives: 0
zfs.vnop_create_negatives: 1
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am

Re: sysctl configs

Postby Brendon » Thu May 08, 2014 11:45 am

I'm not aware of such a document. This is a port of ZFS on Linux, so you may be able to find some pertinent documents around the web. The ultimate reference is the code.

Ask for zfs.arc_max = 0, that means you have the default amount of cache. That figure varies depending on what build you are running. Version 1.2.0 allocates just 6% of the machines memory as cache. "master" allocates 25%. If you are running 1.2.0, increasing the arc size can be done, but if you push it too hard it will panic the machine. Master, you can raise it as high as you like, but if you push it too hard you will run the machine out of memory - going over 40% is not recommended.

Cheers
Brendon


haer22 wrote:Where can I find a explanation of "all" configurables for ZFS, in particular the OSX configurables.

I have not tweaked anything after the install so it looks like below. Seems like I should change ifs.arc_min/max to something > 0. Does it mean I have no cache at the moment?

My minMac is an Core i5 with 16 GB and any suggestions ae welcome.

Code: Select all
[ihecc:~] root# sysctl -A | & grep -i zfs
vfs.zfs has 7 mounted instances
vfs.generic.nfs.client.access_dotzfs: 1
zfs.arc_max: 0
zfs.arc_min: 0
zfs.arc_meta_used: 48378872
zfs.arc_meta_limit: 805306368
zfs.l2arc_write_max: 8388608
zfs.l2arc_write_boost: 8388608
zfs.l2arc_headroom: 2
zfs.l2arc_feed_secs: 1
zfs.l2arc_feed_min_ms: 200
zfs.l2arc_noprefetch: 1
zfs.l2arc_feed_again: 1
zfs.l2arc_norw: 0
zfs.anon_size: 180224
zfs.anon_metadata_lsize: 0
zfs.anon_data_lsize: 0
zfs.mru_size: 765544448
zfs.mru_metadata_lsize: 16189952
zfs.mru_data_lsize: 739802624
zfs.mru_ghost_size: 308169216
zfs.mru_ghost_metadata_lsize: 106973696
zfs.mru_ghost_data_lsize: 201195520
zfs.mfu_size: 3606528
zfs.mfu_metadata_lsize: 738304
zfs.mfu_data_lsize: 2196480
zfs.mfu_ghost_size: 70144
zfs.mfu_ghost_metadata_lsize: 65536
zfs.mfu_ghost_data_lsize: 4608
zfs.l2c_only_size: 0
zfs.vnop_osx_debug: 0
zfs.vnop_ignore_negatives: 0
zfs.vnop_ignore_positives: 0
zfs.vnop_create_negatives: 1
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: sysctl configs

Postby lundman » Thu May 08, 2014 4:50 pm

Most of the sysctl are readonly stats.

Code: Select all
# sysctl zfs spl
zfs.arc_max: 0
zfs.arc_min: 0
zfs.arc_meta_used: 4470568
zfs.arc_meta_limit: 805306368
zfs.l2arc_write_max: 8388608
zfs.l2arc_write_boost: 8388608
zfs.l2arc_headroom: 2
zfs.l2arc_feed_secs: 1
zfs.l2arc_feed_min_ms: 200
zfs.l2arc_noprefetch: 1
zfs.l2arc_feed_again: 1
zfs.l2arc_norw: 0
zfs.anon_size: 147456
zfs.anon_metadata_lsize: 0
zfs.anon_data_lsize: 0
zfs.mru_size: 9143296
zfs.mru_metadata_lsize: 819712
zfs.mru_data_lsize: 7352832
zfs.mru_ghost_size: 90112
zfs.mru_ghost_metadata_lsize: 90112
zfs.mru_ghost_data_lsize: 0
zfs.mfu_size: 95232
zfs.mfu_metadata_lsize: 68096
zfs.mfu_data_lsize: 10752
zfs.mfu_ghost_size: 0
zfs.mfu_ghost_metadata_lsize: 0
zfs.mfu_ghost_data_lsize: 0
zfs.l2c_only_size: 0
zfs.vnop_osx_debug: 0
zfs.vnop_ignore_negatives: 0
zfs.vnop_ignore_positives: 0
zfs.vnop_create_negatives: 1
zfs.reclaim_list: 0
zfs.vnop_reclaim_throttle: 33280
zfs.vfs_suspend_fs_begin_delay: 2
zfs.vfs_suspend_fs_end_delay: 2
spl.kmem_bytes_total: 33283414
spl.num_threads: 87


Of these you can change zfs.arc_max zfs.arc_min as Brendon already pointed out.

zfs.vnop_osx_debug=1 turns on heavy vnop debugging prints (/var/log/system)

zfs.vnop_ignore_negatives: 0
zfs.vnop_ignore_positives: 0
zfs.vnop_create_negatives: 1

Controls the use of namecache. The default is to use the namecache for speed. If you have certain cache issues (files reported not there when they are, or there when they are not) they can be changed.

zfs.vnop_reclaim_throttle: 33280

Controls when we start to slow down the vnode creation so that the reclaim list will not grow too large. Currently set to 50% of available vnodes.

zfs.vfs_suspend_fs_begin_delay: 2
zfs.vfs_suspend_fs_end_delay: 2

Temporary fix to deadlock in "zfs recv -R" code, where sleeping a little avoids a deadlock.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: sysctl configs

Postby haer22 » Fri May 09, 2014 2:47 am

Thanks for the info.

I have pushed arc_max to 4G. That would be the same number as for the next "master" (25% of 16G)
haer22
 
Posts: 123
Joined: Sun Mar 23, 2014 2:13 am


Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: No registered users and 10 guests

cron