Skip to content

Commit 2bd6ca8

Browse files
bcantrilljclulow
authored andcommitted
OS-6387 1K zfs_abd_chunk_size is inducing excessive fragmentation
Reviewed by: Joshua M. Clulow <jmc@joyent.com> Approved by: Joshua M. Clulow <jmc@joyent.com>
1 parent a5857e8 commit 2bd6ca8

File tree

1 file changed

+5
-2
lines changed
  • usr/src/uts/common/fs/zfs

1 file changed

+5
-2
lines changed

usr/src/uts/common/fs/zfs/abd.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,12 @@ boolean_t zfs_abd_scatter_enabled = B_TRUE;
146146
* it at runtime would cause ABD iteration to work incorrectly for ABDs which
147147
* were allocated with the old size, so a safeguard has been put in place which
148148
* will cause the machine to panic if you change it and try to access the data
149-
* within a scattered ABD.
149+
* within a scattered ABD. Note that tuning this value to be smaller than the
150+
* page size can induce heavy fragmentation in the slab layer, which may itself
151+
* result in more memory waste than is saved by the smaller chunk size -- and
152+
* will induces more computational work in the slab layer. Tune with caution!
150153
*/
151-
size_t zfs_abd_chunk_size = 1024;
154+
size_t zfs_abd_chunk_size = 4096;
152155

153156
#ifdef _KERNEL
154157
extern vmem_t *zio_alloc_arena;

0 commit comments

Comments
 (0)