diff options
author | Liu Song <liusong@linux.alibaba.com> | 2023-08-10 23:43:33 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-08-27 11:27:13 -0400 |
commit | 03de20bed203b0819225d4de98353c1f8755a1dd (patch) | |
tree | 1e0695f0f3e30275bc009d6f90816a1b895659de /fs/fsopen.c | |
parent | bb15cea20f211e110150e528fca806f38d5789e0 (diff) |
ext4: do not mark inode dirty every time when appending using delalloc
In the delalloc append write scenario, if inode's i_size is extended due
to buffer write, there are delalloc writes pending in the range up to
i_size, and no need to touch i_disksize since writeback will push
i_disksize up to i_size eventually. Offers significant performance
improvement in high-frequency append write scenarios.
I conducted tests in my 32-core environment by launching 32 concurrent
threads to append write to the same file. Each write operation had a
length of 1024 bytes and was repeated 100000 times. Without using this
patch, the test was completed in 7705 ms. However, with this patch, the
test was completed in 5066 ms, resulting in a performance improvement of
34%.
Moreover, in test scenarios of Kafka version 2.6.2, using packet size of
2K, with this patch resulted in a 10% performance improvement.
Signed-off-by: Liu Song <liusong@linux.alibaba.com>
Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230810154333.84921-1-liusong@linux.alibaba.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/fsopen.c')
0 files changed, 0 insertions, 0 deletions