diff options
author | Brian Behlendorf <[email protected]> | 2014-12-05 17:11:18 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-01-16 13:55:09 -0800 |
commit | 1a20496834f4f270a45c68fd67ade7643442652f (patch) | |
tree | 06dfa88a950d27ba4bbcef0240f60b8ffcc9cc91 /man | |
parent | a988a35a93671c086c38ce5b71b6badb59a9c2de (diff) |
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 <[email protected]>
Diffstat (limited to 'man')
-rw-r--r-- | man/man5/spl-module-parameters.5 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/man/man5/spl-module-parameters.5 b/man/man5/spl-module-parameters.5 index 2ec5b668e..5b7ee8325 100644 --- a/man/man5/spl-module-parameters.5 +++ b/man/man5/spl-module-parameters.5 @@ -123,6 +123,28 @@ Default value: \fBKMALLOC_MAX_SIZE/4\fR. .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 |