If we have a smaller inodes per group, default ra size could
be very small(etc 128KiB), this hurts performances.
Tune above 128K to 1M, i see pass1 time drop down from
677.12 seconds to 246 secons with 32 threads.
E2fsprogs-commit:
9226b3264b74044013f4933280b1989c33be42f3
Change-Id: Ia503b4f73dc8f3d5e6be705c7311bdacc5b874a9
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
return err != EXT2_ET_OP_NOT_SUPPORTED;
}
+#define MIN_DEFAULT_RA (1024 * 1024)
+
unsigned long long e2fsck_guess_readahead(ext2_filsys fs)
{
unsigned long long guess;
* in e2fsck runtime.
*/
guess = 2ULL * fs->blocksize * fs->inode_blocks_per_group;
+ if (guess < MIN_DEFAULT_RA)
+ guess = MIN_DEFAULT_RA;
/* Disable RA if it'd use more 1/50th of RAM. */
if (get_memory_size() > (guess * 50))