aboutsummaryrefslogtreecommitdiffstats
path: root/e2fsck/e2fsck.8.in
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2015-04-20 22:27:19 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-04-21 10:40:21 -0400
commita5abfe0382729fba2c5fea6aaae486cb8bc98f00 (patch)
tree90efa6fe7a5a59305a77f16f6cbd09bb30e90c9d /e2fsck/e2fsck.8.in
parent79614b27098f643a7b112b2c3f111647c13906b3 (diff)
downloadandroid_external_e2fsprogs-a5abfe0382729fba2c5fea6aaae486cb8bc98f00.tar.gz
android_external_e2fsprogs-a5abfe0382729fba2c5fea6aaae486cb8bc98f00.tar.bz2
android_external_e2fsprogs-a5abfe0382729fba2c5fea6aaae486cb8bc98f00.zip
e2fsck: read-ahead metadata during passes 1, 2, and 4
e2fsck pass1 is modified to use the block group data prefetch function to try to fetch the inode tables into the pagecache before it is needed. We iterate through the blockgroups until we have enough inode tables that need reading such that we can issue readahead; then we sit and wait until the last inode table block read of the last group to start fetching the next bunch. pass2 is modified to use the dirblock prefetching function to prefetch the list of directory blocks that are assembled in pass1. We use the "iterate a subset of a dblist" and avoid copying the dblist. Directory blocks are fetched incrementally as we walk through the directory block list. In previous iterations of this patch we would free the directory blocks after processing, but the performance hit to e2fsck itself wasn't worth it. Furthermore, it is anticipated that most users will then mount the FS and start using the directories, so they may as well remain in the page cache. pass4 is modified to prefetch the block and inode bitmaps in anticipation of pass 5, because pass4 is entirely CPU bound. In general, these mechanisms can decrease fsck time by 10-40%, if the host system has sufficient memory and the storage system can provide a lot of IOPs. Pretty much any storage system capable of handling multiple IOs in-flight at any time will see a fairly large performance boost. (Single-issue USB mass storage disks seem to suffer badly.) By default, the readahead buffer size will be set to the size of a block group's inode table (which is 2MiB for a regular ext4 FS). The -E readahead_kb= option can be given to specify the amount of memory to use for readahead or zero to disable it entirely; or an option can be given in e2fsck.conf. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'e2fsck/e2fsck.8.in')
-rw-r--r--e2fsck/e2fsck.8.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/e2fsck/e2fsck.8.in b/e2fsck/e2fsck.8.in
index 3367f4fa..270727a5 100644
--- a/e2fsck/e2fsck.8.in
+++ b/e2fsck/e2fsck.8.in
@@ -220,6 +220,13 @@ option may prevent you from further manual data recovery.
.BI nodiscard
Do not attempt to discard free blocks and unused inode blocks. This option is
exactly the opposite of discard option. This is set as default.
+.TP
+.BI readahead_kb
+Use this many KiB of memory to pre-fetch metadata in the hopes of reducing
+e2fsck runtime. By default, this is set to the size of two block groups' inode
+tables (typically 4MiB on a regular ext4 filesystem); if this amount is more
+than 1/50th of total physical memory, readahead is disabled. Set this to zero
+to disable readahead entirely.
.RE
.TP
.B \-f