FreeBSD ZFS
The Zettabyte File System
Functions | Variables

Tunables

Knobs whose value can be set at compile time or kernel load time. More...

Functions

 SYSCTL_DECL (_vfs_zfs)
 TUNABLE_INT ("vfs.zfs.top_maxinflight",&zfs_top_maxinflight)
 SYSCTL_UINT (_vfs_zfs, OID_AUTO, top_maxinflight, CTLFLAG_RW,&zfs_top_maxinflight, 0,"Maximum I/Os per top-level vdev")
 TUNABLE_INT ("vfs.zfs.resilver_delay",&zfs_resilver_delay)
 SYSCTL_UINT (_vfs_zfs, OID_AUTO, resilver_delay, CTLFLAG_RW,&zfs_resilver_delay, 0,"Number of ticks to delay resilver")
 TUNABLE_INT ("vfs.zfs.scrub_delay",&zfs_scrub_delay)
 SYSCTL_UINT (_vfs_zfs, OID_AUTO, scrub_delay, CTLFLAG_RW,&zfs_scrub_delay, 0,"Number of ticks to delay scrub")
 TUNABLE_INT ("vfs.zfs.scan_idle",&zfs_scan_idle)
 SYSCTL_UINT (_vfs_zfs, OID_AUTO, scan_idle, CTLFLAG_RW,&zfs_scan_idle, 0,"Idle scan window in clock ticks")
 TUNABLE_INT ("vfs.zfs.scan_min_time_ms",&zfs_scan_min_time_ms)
 SYSCTL_UINT (_vfs_zfs, OID_AUTO, scan_min_time_ms, CTLFLAG_RW,&zfs_scan_min_time_ms, 0,"Min millisecs to scrub per txg")
 TUNABLE_INT ("vfs.zfs.free_min_time_ms",&zfs_free_min_time_ms)
 SYSCTL_UINT (_vfs_zfs, OID_AUTO, free_min_time_ms, CTLFLAG_RW,&zfs_free_min_time_ms, 0,"Min millisecs to free per txg")
 TUNABLE_INT ("vfs.zfs.resilver_min_time_ms",&zfs_resilver_min_time_ms)
 SYSCTL_UINT (_vfs_zfs, OID_AUTO, resilver_min_time_ms, CTLFLAG_RW,&zfs_resilver_min_time_ms, 0,"Min millisecs to resilver per txg")
 TUNABLE_INT ("vfs.zfs.no_scrub_io",&zfs_no_scrub_io)
 SYSCTL_INT (_vfs_zfs, OID_AUTO, no_scrub_io, CTLFLAG_RW,&zfs_no_scrub_io, 0,"Disable scrub I/O")
 TUNABLE_INT ("vfs.zfs.no_scrub_prefetch",&zfs_no_scrub_prefetch)
 SYSCTL_INT (_vfs_zfs, OID_AUTO, no_scrub_prefetch, CTLFLAG_RW,&zfs_no_scrub_prefetch, 0,"Disable scrub prefetching")

Variables

uint64_t zfs_arc_max
uint64_t zfs_arc_min
uint64_t zfs_arc_meta_limit = 0
uint64_t l2arc_write_max = L2ARC_WRITE_SIZE
 default max write size
uint64_t l2arc_write_boost = L2ARC_WRITE_SIZE
 extra write during warmup
uint64_t l2arc_headroom = L2ARC_HEADROOM
 number of dev writes
uint64_t l2arc_feed_secs = L2ARC_FEED_SECS
 interval seconds
uint64_t l2arc_feed_min_ms = L2ARC_FEED_MIN_MS
 min interval milliseconds
boolean_t l2arc_noprefetch = B_TRUE
 don't cache prefetch bufs
boolean_t l2arc_feed_again = B_TRUE
 turbo warmup
boolean_t l2arc_norw = B_TRUE
 no reads during writes
int zfs_dedup_prefetch = 1
 Enable/disable prefetching of dedup-ed blocks which are going to be freed.
int zfs_prefetch_disable = 0
uint32_t zfetch_max_streams = 8
 max # of streams per zfetch
uint32_t zfetch_min_sec_reap = 2
 min time before stream reclaim
uint32_t zfetch_block_cap = 256
 max number of blocks to fetch at a time
uint64_t zfetch_array_rd_sz = 1024 * 1024
 number of bytes in a array_read at which we stop prefetching (1Mb)
int zfs_no_write_throttle = 0
int zfs_write_limit_shift = 3
 1/8th of physical memory
int zfs_txg_synctime_ms = 1000
 target millisecs to sync a txg
uint64_t zfs_write_limit_min = 32 << 20
 min write limit is 32MB
uint64_t zfs_write_limit_max = 0
 max data payload per txg
uint64_t zfs_write_limit_inflated = 0
uint64_t zfs_write_limit_override = 0
unsigned int zfs_top_maxinflight = 32
 maximum I/Os per top-level
unsigned int zfs_resilver_delay = 2
 number of ticks to delay resilver
unsigned int zfs_scrub_delay = 4
 number of ticks to delay scrub
unsigned int zfs_scan_idle = 50
 idle window in clock ticks
unsigned int zfs_scan_min_time_ms = 1000
 min millisecs to scrub per txg
unsigned int zfs_free_min_time_ms = 1000
 min millisecs to free per txg
unsigned int zfs_resilver_min_time_ms = 3000
 min millisecs to resilver per txg
boolean_t zfs_no_scrub_io = B_FALSE
 set to disable scrub i/o
boolean_t zfs_no_scrub_prefetch = B_FALSE
 set to disable scrub prefetching
int zfs_mg_alloc_failures = 0
 This value defines the number of allowed allocation failures per vdev.
int check_hostid = 1
 Check hostid on import?
int zfs_ccw_retry_interval = 300
 The interval at which failed configuration cache file writes should be retried.
int zfs_recover = 0
 zfs_recover can be set to nonzero to attempt to recover from otherwise-fatal errors, typically caused by on-disk corruption.
int zfs_txg_timeout = 5
 max seconds worth of delta per txg
int zfs_vdev_cache_max = 1<<14
 All i/os smaller than zfs_vdev_cache_max will be turned into 1<<zfs_vdev_cache_bshift byte reads by the vdev_cache (aka software track buffer).
int zfs_vdev_cache_size = 0
int zfs_vdev_cache_bshift = 16
static int vdev_geom_bio_flush_disable = 0
 Don't send BIO_FLUSH.
static int vdev_geom_bio_delete_disable = 0
 Don't send BIO_DELETE.
int zfs_vdev_max_pending = 10
 The maximum number of i/os concurrently pending to each device.
int zfs_vdev_min_pending = 4
 The initial number of i/os pending to each device (before it starts ramping up to max_pending).
int zfs_vdev_time_shift = 6
 deadline = pri + ddi_get_lbolt64() >> time_shift)
int zfs_vdev_ramp_rate = 2
 exponential I/O issue ramp-up rate
int zfs_vdev_aggregation_limit = SPA_MAXBLOCKSIZE
 To reduce IOPs, we aggregate small adjacent I/Os into one large I/O.
int zfs_vdev_read_gap_limit = 32 << 10
int zfs_vdev_write_gap_limit = 4 << 10
int zfs_debug_level
int zil_replay_disable = 0
 Disable intent logging replay.
boolean_t zfs_nocacheflush = B_FALSE
 Tunable parameter for debugging or performance analysis.
int zio_use_uma = 0

Detailed Description

Knobs whose value can be set at compile time or kernel load time.


Function Documentation

SYSCTL_DECL ( _vfs_zfs  )
SYSCTL_INT ( _vfs_zfs  ,
OID_AUTO  ,
no_scrub_io  ,
CTLFLAG_RW  ,
zfs_no_scrub_io,
,
"Disable scrub I/O"   
)
SYSCTL_INT ( _vfs_zfs  ,
OID_AUTO  ,
no_scrub_prefetch  ,
CTLFLAG_RW  ,
zfs_no_scrub_prefetch,
,
"Disable scrub prefetching"   
)
SYSCTL_UINT ( _vfs_zfs  ,
OID_AUTO  ,
scan_idle  ,
CTLFLAG_RW  ,
zfs_scan_idle,
,
"Idle scan window in clock ticks"   
)
SYSCTL_UINT ( _vfs_zfs  ,
OID_AUTO  ,
resilver_delay  ,
CTLFLAG_RW  ,
zfs_resilver_delay,
,
"Number of ticks to delay resilver"   
)
SYSCTL_UINT ( _vfs_zfs  ,
OID_AUTO  ,
resilver_min_time_ms  ,
CTLFLAG_RW  ,
zfs_resilver_min_time_ms,
,
"Min millisecs to resilver per txg"   
)
SYSCTL_UINT ( _vfs_zfs  ,
OID_AUTO  ,
scan_min_time_ms  ,
CTLFLAG_RW  ,
zfs_scan_min_time_ms,
,
"Min millisecs to scrub per txg"   
)
SYSCTL_UINT ( _vfs_zfs  ,
OID_AUTO  ,
top_maxinflight  ,
CTLFLAG_RW  ,
zfs_top_maxinflight,
,
"Maximum I/Os per top-level vdev  
)
SYSCTL_UINT ( _vfs_zfs  ,
OID_AUTO  ,
free_min_time_ms  ,
CTLFLAG_RW  ,
zfs_free_min_time_ms,
,
"Min millisecs to free per txg"   
)
SYSCTL_UINT ( _vfs_zfs  ,
OID_AUTO  ,
scrub_delay  ,
CTLFLAG_RW  ,
zfs_scrub_delay,
,
"Number of ticks to delay scrub"   
)
TUNABLE_INT ( "vfs.zfs.scan_min_time_ms"  ,
zfs_scan_min_time_ms 
)
TUNABLE_INT ( "vfs.zfs.no_scrub_prefetch"  ,
zfs_no_scrub_prefetch 
)
TUNABLE_INT ( "vfs.zfs.resilver_delay"  ,
zfs_resilver_delay 
)
TUNABLE_INT ( "vfs.zfs.free_min_time_ms"  ,
zfs_free_min_time_ms 
)
TUNABLE_INT ( "vfs.zfs.scrub_delay"  ,
zfs_scrub_delay 
)
TUNABLE_INT ( "vfs.zfs.no_scrub_io"  ,
zfs_no_scrub_io 
)
TUNABLE_INT ( "vfs.zfs.scan_idle"  ,
zfs_scan_idle 
)
TUNABLE_INT ( "vfs.zfs.top_maxinflight"  ,
zfs_top_maxinflight 
)
TUNABLE_INT ( "vfs.zfs.resilver_min_time_ms"  ,
zfs_resilver_min_time_ms 
)

Variable Documentation

int check_hostid = 1

Check hostid on import?

Definition at line 84 of file spa.c.

boolean_t l2arc_feed_again = B_TRUE

turbo warmup

Definition at line 668 of file arc.c.

uint64_t l2arc_feed_min_ms = L2ARC_FEED_MIN_MS

min interval milliseconds

Definition at line 666 of file arc.c.

uint64_t l2arc_feed_secs = L2ARC_FEED_SECS

interval seconds

Definition at line 665 of file arc.c.

uint64_t l2arc_headroom = L2ARC_HEADROOM

number of dev writes

Definition at line 664 of file arc.c.

boolean_t l2arc_noprefetch = B_TRUE

don't cache prefetch bufs

Definition at line 667 of file arc.c.

boolean_t l2arc_norw = B_TRUE

no reads during writes

Definition at line 669 of file arc.c.

uint64_t l2arc_write_boost = L2ARC_WRITE_SIZE

extra write during warmup

Definition at line 663 of file arc.c.

uint64_t l2arc_write_max = L2ARC_WRITE_SIZE

default max write size

Definition at line 662 of file arc.c.

int vdev_geom_bio_delete_disable = 0 [static]

Don't send BIO_DELETE.

If set, the zvs_vdev class will not send BIO_DELETE.

Definition at line 74 of file vdev_geom.c.

int vdev_geom_bio_flush_disable = 0 [static]

Don't send BIO_FLUSH.

If set, the zvs_vdev class will not send BIO_FLUSH.

Definition at line 63 of file vdev_geom.c.

uint64_t zfetch_array_rd_sz = 1024 * 1024

number of bytes in a array_read at which we stop prefetching (1Mb)

Definition at line 52 of file dmu_zfetch.c.

uint32_t zfetch_block_cap = 256

max number of blocks to fetch at a time

Definition at line 50 of file dmu_zfetch.c.

uint32_t zfetch_max_streams = 8

max # of streams per zfetch

Definition at line 46 of file dmu_zfetch.c.

uint32_t zfetch_min_sec_reap = 2

min time before stream reclaim

Definition at line 48 of file dmu_zfetch.c.

uint64_t zfs_arc_max

Definition at line 196 of file arc.c.

uint64_t zfs_arc_meta_limit = 0

Definition at line 198 of file arc.c.

uint64_t zfs_arc_min

Definition at line 197 of file arc.c.

The interval at which failed configuration cache file writes should be retried.

Definition at line 92 of file spa.c.

Definition at line 78 of file zfs_vfsops.c.

Enable/disable prefetching of dedup-ed blocks which are going to be freed.

Definition at line 45 of file ddt.c.

unsigned int zfs_free_min_time_ms = 1000

min millisecs to free per txg

Definition at line 71 of file dsl_scan.c.

This value defines the number of allowed allocation failures per vdev.

If a device reaches this threshold in a given txg then we consider skipping allocations on that device.

Definition at line 56 of file metaslab.c.

boolean_t zfs_no_scrub_io = B_FALSE

set to disable scrub i/o

Definition at line 74 of file dsl_scan.c.

boolean_t zfs_no_scrub_prefetch = B_FALSE

set to disable scrub prefetching

Definition at line 76 of file dsl_scan.c.

Definition at line 49 of file dsl_pool.c.

boolean_t zfs_nocacheflush = B_FALSE

Tunable parameter for debugging or performance analysis.

Setting zfs_nocacheflush will cause corruption on power loss if a volatile out-of-order write cache is enabled.

Definition at line 91 of file zil.c.

Definition at line 43 of file dmu_zfetch.c.

int zfs_recover = 0

zfs_recover can be set to nonzero to attempt to recover from otherwise-fatal errors, typically caused by on-disk corruption.

When set, calls to zfs_panic_recover() will turn into warning messages.

Definition at line 234 of file spa_misc.c.

unsigned int zfs_resilver_delay = 2

number of ticks to delay resilver

Definition at line 66 of file dsl_scan.c.

unsigned int zfs_resilver_min_time_ms = 3000

min millisecs to resilver per txg

Definition at line 73 of file dsl_scan.c.

unsigned int zfs_scan_idle = 50

idle window in clock ticks

Definition at line 68 of file dsl_scan.c.

unsigned int zfs_scan_min_time_ms = 1000

min millisecs to scrub per txg

Definition at line 70 of file dsl_scan.c.

unsigned int zfs_scrub_delay = 4

number of ticks to delay scrub

Definition at line 67 of file dsl_scan.c.

unsigned int zfs_top_maxinflight = 32

maximum I/Os per top-level

Definition at line 65 of file dsl_scan.c.

int zfs_txg_synctime_ms = 1000

target millisecs to sync a txg

Definition at line 51 of file dsl_pool.c.

int zfs_txg_timeout = 5

max seconds worth of delta per txg

Definition at line 48 of file txg.c.

int zfs_vdev_aggregation_limit = SPA_MAXBLOCKSIZE

To reduce IOPs, we aggregate small adjacent I/Os into one large I/O.

For read I/Os, we also aggregate across small adjacency gaps; for writes we include spans of optional I/Os to aid aggregation at the disk even when they aren't able to help us aggregate at this level.

Definition at line 59 of file vdev_queue.c.

Definition at line 89 of file vdev_cache.c.

int zfs_vdev_cache_max = 1<<14

All i/os smaller than zfs_vdev_cache_max will be turned into 1<<zfs_vdev_cache_bshift byte reads by the vdev_cache (aka software track buffer).

At most zfs_vdev_cache_size bytes will be kept in each vdev's vdev_cache.

Todo:
With the current ZFS code, it turns out that the vdev cache is not helpful, and in some cases actually harmful. It is better if we disable this. Once some time has passed, we should actually remove this to simplify the code. For now we just disable it by setting the zfs_vdev_cache_size to zero. Note that Solaris 11 has made these same changes.

Definition at line 87 of file vdev_cache.c.

Definition at line 88 of file vdev_cache.c.

The maximum number of i/os concurrently pending to each device.

Definition at line 39 of file vdev_queue.c.

The initial number of i/os pending to each device (before it starts ramping up to max_pending).

Definition at line 45 of file vdev_queue.c.

exponential I/O issue ramp-up rate

Definition at line 51 of file vdev_queue.c.

int zfs_vdev_read_gap_limit = 32 << 10

Definition at line 60 of file vdev_queue.c.

deadline = pri + ddi_get_lbolt64() >> time_shift)

Definition at line 48 of file vdev_queue.c.

int zfs_vdev_write_gap_limit = 4 << 10

Definition at line 61 of file vdev_queue.c.

Definition at line 55 of file dsl_pool.c.

uint64_t zfs_write_limit_max = 0

max data payload per txg

Definition at line 54 of file dsl_pool.c.

uint64_t zfs_write_limit_min = 32 << 20

min write limit is 32MB

Definition at line 53 of file dsl_pool.c.

Definition at line 56 of file dsl_pool.c.

1/8th of physical memory

Definition at line 50 of file dsl_pool.c.

Disable intent logging replay.

This global ZIL switch affects all pools.

Definition at line 78 of file zil.c.

int zio_use_uma = 0

Definition at line 45 of file zio.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines