summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/reservations.h
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2010-04-06 03:17:15 +0200
committerJoel Becker <joel.becker@oracle.com>2010-05-06 03:18:07 +0200
commitb07f8f24dfe54da0f074b78949044842e8df881f (patch)
tree8cc24b0a1e02a9b7f1241fbfecca50ac6881b938 /fs/ocfs2/reservations.h
parentocfs2: increase the default size of local alloc windows (diff)
downloadlinux-b07f8f24dfe54da0f074b78949044842e8df881f.tar.xz
linux-b07f8f24dfe54da0f074b78949044842e8df881f.zip
ocfs2: change default reservation window sizes
The default reservation size of 4 (32-bit windows) is a bit too ambitious. Scale it back to 16 bits (resv_level=2). I have been testing various sizes on a 4-node cluster which runs a mixed workload that is heavily threaded. With a 256MB local alloc, I get *roughly* the following levels of average file fragmentation: resv_level=0 70% resv_level=1 21% resv_level=2 23% resv_level=3 24% resv_level=4 60% resv_level=5 did not test resv_level=6 60% resv_level=2 seemed like a good compromise between not letting windows be too small, but not so big that heavier workloads will immediately suffer without tuning. This patch also change the behavior of directory reservations - they now track file reservations. The previous compromise of giving directory windows only 8 bits wound up fragmenting more at some window sizes because file allocations had smaller unused windows to poach from. Signed-off-by: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/reservations.h')
-rw-r--r--fs/ocfs2/reservations.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/reservations.h b/fs/ocfs2/reservations.h
index 34bb308375c5..022aff601e15 100644
--- a/fs/ocfs2/reservations.h
+++ b/fs/ocfs2/reservations.h
@@ -22,7 +22,7 @@
#include <linux/rbtree.h>
-#define OCFS2_DEFAULT_RESV_LEVEL 4
+#define OCFS2_DEFAULT_RESV_LEVEL 2
#define OCFS2_MAX_RESV_LEVEL 9
#define OCFS2_MIN_RESV_LEVEL 0