summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_cache.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-04-11 19:31:16 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:38 +0300
commitf270667a7fc020f1711953ad3b0d6e6b38eba834 (patch)
tree3c96018cdc7f482a66f0287b720eeb5235fdfafe /fs/bcachefs/btree_cache.h
parent15a07f2eae6852dc4f3c1172601d592be0f5756f (diff)
downloadlinux-f270667a7fc020f1711953ad3b0d6e6b38eba834.tar.xz
bcachefs: Slightly reduce btree split threshold
2/3rds performs a lot better than 3/4ths on the tested workloda, leading to significanly fewer btree node compactions. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_cache.h')
-rw-r--r--fs/bcachefs/btree_cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_cache.h b/fs/bcachefs/btree_cache.h
index abde6c2658c6..2160012c734f 100644
--- a/fs/bcachefs/btree_cache.h
+++ b/fs/bcachefs/btree_cache.h
@@ -94,7 +94,7 @@ static inline unsigned btree_blocks(struct bch_fs *c)
return c->opts.btree_node_size >> c->block_bits;
}
-#define BTREE_SPLIT_THRESHOLD(c) (btree_max_u64s(c) * 3 / 4)
+#define BTREE_SPLIT_THRESHOLD(c) (btree_max_u64s(c) * 2 / 3)
#define BTREE_FOREGROUND_MERGE_THRESHOLD(c) (btree_max_u64s(c) * 1 / 3)
#define BTREE_FOREGROUND_MERGE_HYSTERESIS(c) \