From: Miao Xie <miaox@cn.fujitsu.com>
To: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: [GIT PULL] [RFC PATCH 0/4] btrfs: Implement delayed directory name index insertion and deletion
Date: Wed, 01 Dec 2010 16:09:17 +0800 [thread overview]
Message-ID: <4CF602AD.8020205@cn.fujitsu.com> (raw)
Compare with Ext3/4, the performance of file creation and deletion on btrfs is
very poor. the reason is that btrfs must do a lot of b+ tree insertions, such as
inode item, directory name item, directory name index and so on.
If we can do some delayed b+ tree insertion or deletion, we can improve the
performance, so we made this patch which implemented delayed directory name
index insertion and deletion.
Beside that, we found we must map the page every time we want to set a member
variable of the inode item, it is inefficient. We just do it at first to reduce
the times of mmap(). By this way, we can also improve the performance of file
creation and deletion.
I did a quick test by the benchmark tool[1] and found we can improve the
performance of file creation by ~11%, and file deletion by ~14%.
Before applying this patch:
Create files:
Total files: 50000
Total time: 1.188547
Average time: 0.000024
Delete files:
Total files: 50000
Total time: 1.662012
Average time: 0.000033
After applying this patch:
Create files:
Total files: 50000
Total time: 1.057432
Average time: 0.000021
Delete files:
Total files: 50000
Total time: 1.422851
Average time: 0.000028
You can also try out the patchset by pulling:
git://repo.or.cz/linux-btrfs-devel.git perf-improve
[1] http://marc.info/?l=linux-btrfs&m=128212635122920&q=p3
---
fs/btrfs/Makefile | 2 +-
fs/btrfs/btrfs_inode.h | 2 +
fs/btrfs/ctree.c | 13 +-
fs/btrfs/ctree.h | 21 +-
fs/btrfs/delayed-dir-index.c | 790 ++++++++++++++++++++++++++++++++++++++++++
fs/btrfs/delayed-dir-index.h | 92 +++++
fs/btrfs/dir-item.c | 61 +++-
fs/btrfs/extent-tree.c | 21 ++
fs/btrfs/inode.c | 189 +++++++---
fs/btrfs/transaction.c | 9 +
fs/btrfs/transaction.h | 2 +
11 files changed, 1117 insertions(+), 85 deletions(-)
next reply other threads:[~2010-12-01 8:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 8:09 Miao Xie [this message]
2010-12-31 15:43 ` [GIT PULL] [RFC PATCH 0/4] btrfs: Implement delayed directory name index insertion and deletion Itaru Kitayama
2011-01-06 6:47 ` Miao Xie
2011-01-10 3:16 ` Itaru Kitayama
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=4CF602AD.8020205@cn.fujitsu.com \
--to=miaox@cn.fujitsu.com \
--cc=linux-btrfs@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).