Skip to content

Commit

Permalink
setup/fs: fix ext4 lazyinit performance issue
Browse files Browse the repository at this point in the history
During ext4 filesystem performance test, we find newly formatted ext4 fs will create
a lazyinit kernel thread in background, which will disturb fio performance test.
According to https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem#Lazy_Initialization,
it is better to disable lazyinit mechanism to make ext4 performance test result similar
to workload in realworld.
For ext2, there is no lazyinit mechanism, so the format parameters for ext2 remain as before.

Signed-off-by: Yue Zhao <[email protected]>
  • Loading branch information
findns94 committed Apr 16, 2024
1 parent d075562 commit c9bada1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup/fs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ fs_options() {
# mkfs.xfs v5.10.0 would set reflink=1 by default, and conflict with DAX mount option, so need to set reflink=0 explicitly
ensure_mkfs='-f -mreflink=0'
;;
ext*)
ext2)
ensure_mkfs='-q -F'
;;
ext4)
ensure_mkfs='-q -E lazy_itable_init=0,lazy_journal_init=0 -F'
;;
btrfs)
;;
f2fs)
Expand Down

0 comments on commit c9bada1

Please sign in to comment.