[PATCH] avoid scanning bitmaps for group preallocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is the patch I mentioned today on the call. It avoids (or at least reduces) serious latency (10 minutes or more) on a large filesystem (8TB+) on the first write, if the filesystem is nearly full. The latency is entirely due to seeking to read the block bitmaps, so is considerably less serious on flex_bg formatted filesystems.

A better long-term approach would be to store in the superblock the last group that had space to allocate a stripe-sized chunk and/or flag in the group descriptor if there is not a large amount of contiguous free space therein (cleared on freeing blocks in the group).

Having the mount-time buddy-bitmap (and checksum verifying) scanning thread start at mount would only help if the first write to the filesystem is not immediately after mount (which it is in Lustre at least). Having a filesystem-wide (r)btree for the freespace (ala XFS) would also only help if the btree could be (at least partially) built from bitmaps before the first write, unless we cache the bitmap on disk, which caused Lustre plenty in the past and I'm leery to do it.


Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

Attachment: ext4-mballoc-skip.diff
Description: Binary data





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux