diff options
author | Mark Fasheh <mfasheh@suse.com> | 2010-04-05 21:17:14 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-05 21:18:07 -0400 |
commit | 6b82021b9e91cd689fdffadbcdb9a42597bbe764 (patch) | |
tree | ac4235e792e74a2e60a41e95d62965b7ed4b3232 /fs/ocfs2/super.c | |
parent | 73c8a80003d13be54e2309865030404441075182 (diff) |
ocfs2: increase the default size of local alloc windows
I have observed that the current size of 8M gives us pretty poor
fragmentation on multi-threaded workloads which do lots of writes.
Generally, I can increase the size of local alloc windows and observe a
marked decrease in fragmentation, even up and beyond window sizes of 512
megabytes. This makes sense for a couple reasons - larger local alloc means
more room for reservation windows. On multi-node workloads the larger local
alloc helps as well because we don't have to do window slides as often.
Also, I removed the OCFS2_DEFAULT_LOCAL_ALLOC_SIZE constant as it is no
longer used and the comment above it was out of date.
To test fragmentation, I used a workload which launched 4 threads that did
4k writes into a series of about 140 alternating files.
With resv_level=2, and a 4k/4k file system I observed the following average
fragmentation for various localalloc= parameters:
localalloc= avg. fragmentation
8 48
32 16
64 10
120 7
On larger cluster sizes, the difference is more dramatic.
The new default size top out at 256M, which we'll only get for cluster
sizes of 32K and above.
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index fc839996d052..5745682eb1c0 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1503,7 +1503,7 @@ static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt) | |||
1503 | (unsigned) (osb->osb_commit_interval / HZ)); | 1503 | (unsigned) (osb->osb_commit_interval / HZ)); |
1504 | 1504 | ||
1505 | local_alloc_megs = osb->local_alloc_bits >> (20 - osb->s_clustersize_bits); | 1505 | local_alloc_megs = osb->local_alloc_bits >> (20 - osb->s_clustersize_bits); |
1506 | if (local_alloc_megs != OCFS2_DEFAULT_LOCAL_ALLOC_SIZE) | 1506 | if (local_alloc_megs != ocfs2_la_default_mb(osb)) |
1507 | seq_printf(s, ",localalloc=%d", local_alloc_megs); | 1507 | seq_printf(s, ",localalloc=%d", local_alloc_megs); |
1508 | 1508 | ||
1509 | if (opts & OCFS2_MOUNT_LOCALFLOCKS) | 1509 | if (opts & OCFS2_MOUNT_LOCALFLOCKS) |
@@ -2251,6 +2251,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2251 | } | 2251 | } |
2252 | 2252 | ||
2253 | osb->bitmap_blkno = OCFS2_I(inode)->ip_blkno; | 2253 | osb->bitmap_blkno = OCFS2_I(inode)->ip_blkno; |
2254 | osb->osb_clusters_at_boot = OCFS2_I(inode)->ip_clusters; | ||
2254 | iput(inode); | 2255 | iput(inode); |
2255 | 2256 | ||
2256 | osb->bitmap_cpg = ocfs2_group_bitmap_size(sb) * 8; | 2257 | osb->bitmap_cpg = ocfs2_group_bitmap_size(sb) * 8; |