From: Kazuya Mio <k-mio@sx.jp.nec.com>
To: ext4 <linux-ext4@vger.kernel.org>, Jan Kara <jack@suse.cz>,
Andreas Dilger <adilger@dilger.ca>
Subject: [PATCH 0/2] ext3: Reduce calling ext3_mark_inode_dirty() for speedup
Date: Mon, 30 Jan 2012 17:41:17 +0900 [thread overview]
Message-ID: <4F2657AD.9060901@sx.jp.nec.com> (raw)
ext3 has a performance problem that parallel write is too slow.
I looked into this and found out that ext3 calls ext3_mark_inode_dirty()
unnecessarily.
The following result is the time of writing 16 files whose size are 3GB
by 16 threads. This measurement was performed in linux3.3-rc1 with
4-way server, 512GB memory.
filesystem time(sec) call ext3_mark_inode_dirty(times)
---
ext3 220.5 50,338,104
ext3 (patched) 196.3 25,169,658
ext4 (*1) 190.3 28,465,799
*1 disable ext4-specific option (delalloc, extent, and so on)
ext3 in RHEL5.5 clearly shows the difference in performance.
Writing by the same method takes 533 seconds, though writing by one thread
takes 191 seconds.
Every time we write one page, ext3 calls ext3_mark_inode_dirty() four times.
Two of these are unnecessary in many case, so I add the conditions to call
the function only when it is necessary.
sys_write
...
__generic_file_aio_write
file_update_time
mark_inode_dirty_sync
generic_file_buffered_write
...
ext3_get_blocks_handle
ext3_write_begin
...
ext3_new_blocks
vfs_dq_alloc_block
1) mark_inode_dirty
vfs_dq_free_block
2) mark_inode_dirty <-- patch 1/2
ext3_splice_branch
3) ext3_mark_inode_dirty <-- patch 2/2
ext3_ordered_write_end
update_file_sizes
4) mark_inode_dirty
Regards,
Kazuya Mio
next reply other threads:[~2012-01-30 8:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 8:41 Kazuya Mio [this message]
2012-01-30 20:36 ` [PATCH 0/2] ext3: Reduce calling ext3_mark_inode_dirty() for speedup Andreas Dilger
2012-01-31 5:03 ` Kazuya Mio
2012-02-01 8:35 ` Kazuya Mio
2012-02-02 22:36 ` Andreas Dilger
2012-02-03 7:49 ` Kazuya Mio
2012-02-03 13:28 ` Yongqiang Yang
2012-02-06 4:13 ` Kazuya Mio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F2657AD.9060901@sx.jp.nec.com \
--to=k-mio@sx.jp.nec.com \
--cc=adilger@dilger.ca \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).