From: Brian Behlendorf Date: Wed, 30 Mar 2011 05:38:53 +0000 (-0700) Subject: Decrease target objects per slab X-Git-Tag: zfs-0.8.0-rc1~152^2~476 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83150861e610701d44510816e2062bcf407f51ab;p=zfs Decrease target objects per slab By decreasing the number of target objects per slab we increase the likelyhood that a slab can be freed. This reduces the level of fragmentation in the slab which has been observed to be a problem for certain workloads. The penalty for this is that we also decrease the speed which need objects can be allocated. --- diff --git a/include/sys/kmem.h b/include/sys/kmem.h index d3972f1ca..72f70c282 100644 --- a/include/sys/kmem.h +++ b/include/sys/kmem.h @@ -334,7 +334,7 @@ extern struct rw_semaphore spl_kmem_cache_sem; #define SPL_KMEM_CACHE_DELAY 15 /* Minimum slab release age */ #define SPL_KMEM_CACHE_REAP 0 /* Default reap everything */ -#define SPL_KMEM_CACHE_OBJ_PER_SLAB 32 /* Target objects per slab */ +#define SPL_KMEM_CACHE_OBJ_PER_SLAB 16 /* Target objects per slab */ #define SPL_KMEM_CACHE_OBJ_PER_SLAB_MIN 8 /* Minimum objects per slab */ #define SPL_KMEM_CACHE_ALIGN 8 /* Default object alignment */