mirror_zfs/man/man5/spl-module-parameters.5
Brian Behlendorf 1a20496834 Make slab reclaim more aggressive
Many people have noticed that the kmem cache implementation is slow
to release its memory.  This patch makes the reclaim behavior more
aggressive by immediately freeing a slab once it is empty.  Unused
objects which are cached in the magazines will still prevent a slab
from being freed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2015-01-16 13:55:09 -08:00

177 lines
3.8 KiB
Groff

'\" te
.\"
.\" Copyright 2013 Turbo Fredriksson <turbo@bayour.com>. All rights reserved.
.\"
.TH SPL-MODULE-PARAMETERS 5 "Nov 18, 2013"
.SH NAME
spl\-module\-parameters \- SPL module parameters
.SH DESCRIPTION
.sp
.LP
Description of the different parameters to the SPL module.
.SS "Module parameters"
.sp
.LP
.sp
.ne 2
.na
\fBspl_debug_subsys\fR (ulong)
.ad
.RS 12n
Subsystem debugging level mask.
.sp
Default value: \fB~0\fR.
.RE
.sp
.ne 2
.na
\fBspl_debug_mask\fR (ulong)
.ad
.RS 12n
Debugging level mask.
.sp
Default value: \fB8 | 10 | 4 | 20\fR (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE).
.RE
.sp
.ne 2
.na
\fBspl_debug_printk\fR (ulong)
.ad
.RS 12n
Console printk level mask.
.sp
Default value: \fB8 | 10 | 4 | 20\fR (SD_ERROR | SD_EMERG | SD_WARNING | SD_CONSOLE).
.RE
.sp
.ne 2
.na
\fBspl_debug_mb\fR (int)
.ad
.RS 12n
Total debug buffer size.
.sp
Default value: \fB-1\fR.
.RE
.sp
.ne 2
.na
\fBspl_debug_panic_on_bug\fR (int)
.ad
.RS 12n
Panic on BUG
.sp
Use \fB1\fR for yes and \fB0\fR for no (default).
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_expire\fR (uint)
.ad
.RS 12n
By age (0x1) or low memory (0x2)
.sp
Default value: \fB0\fR.
.RE
.sp
.ne 2
.na
\fBspl_kmem_alloc_warn\fR (uint)
.ad
.RS 12n
As a general rule kmem_alloc() allocations should be small, preferably
just a few pages since they must by physically contiguous. Therefore, a
rate limited warning will be printed to the console for any kmem_alloc()
which exceeds a reasonable threshold.
The default warning threshold is set to eight pages but capped at 32K to
accommodate systems using large pages. This value was selected to be small
enough to ensure the largest allocations are quickly noticed and fixed.
But large enough to avoid logging any warnings when a allocation size is
larger than optimal but not a serious concern. Since this value is tunable,
developers are encouraged to set it lower when testing so any new largish
allocations are quickly caught. These warnings may be disabled by setting
the threshold to zero.
.sp
Default value: \fB32K\fR.
.RE
.sp
.ne 2
.na
\fBspl_kmem_alloc_max\fR (uint)
.ad
.RS 12n
Large kmem_alloc() allocations will fail if they exceed KMALLOC_MAX_SIZE.
Allocations which are marginally smaller than this limit may succeed but
should still be avoided due to the expense of locating a contiguous range
of free pages. Therefore, a maximum kmem size with reasonable safely
margin of 4x is set. Kmem_alloc() allocations larger than this maximum
will quickly fail. Vmem_alloc() allocations less than or equal to this
value will use kmalloc(), but shift to vmalloc() when exceeding this value.
.sp
Default value: \fBKMALLOC_MAX_SIZE/4\fR.
.RE
.sp
.ne 2
.na
\fBspl_kmem_cache_magazine_size\fR (uint)
.ad
.RS 12n
Cache magazines are an optimization designed to minimize the cost of
allocating memory. They do this by keeping a per-cpu cache of recently
freed objects, which can then be reallocated without taking a lock. This
can improve performance on highly contended caches. However, because
objects in magazines will prevent otherwise empty slabs from being
immediately released this may not be ideal for low memory machines.
.sp
For this reason \fBspl_kmem_cache_magazine_size\fR can be used to set a
maximum magazine size. When this value is set to 0 the magazine size will
be automatically determined based on the object size. Otherwise magazines
will be limited to 2-256 objects per magazine (i.e per cpu). Magazines
may never be entirely disabled in this implementation.
.sp
Default value: \fB0\fR.
.RE
.sp
.ne 2
.na
\fBspl_hostid\fR (ulong)
.ad
.RS 12n
The system hostid.
.sp
Default value: \fB0xFFFFFFFF\fR (an invalid hostid!)
.RE
.sp
.ne 2
.na
\fBspl_hostid_path\fR (charp)
.ad
.RS 12n
The system hostid file
.sp
Default value: \fB/etc/hostid\fR.
.RE
.sp
.ne 2
.na
\fBspl_taskq_thread_bind\fR (int)
.ad
.RS 12n
Bind taskq thread to CPU
.sp
Default value: \fB0\fR.
.RE