From: Chris Mason <chris.mason@oracle.com>
To: Miao Xie <miaox@cn.fujitsu.com>
Cc: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [RFC PATCH 4/4] btrfs: implement delayed dir index insertion and deletion
Date: Thu, 02 Dec 2010 11:33:40 -0500 [thread overview]
Message-ID: <1291307496-sup-6170@think> (raw)
In-Reply-To: <4CF602BF.7010805@cn.fujitsu.com>
Excerpts from Miao Xie's message of 2010-12-01 03:09:35 -0500:
> 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.
Many thanks for working on this. It's a difficult problem and these
patches look very clean.
I think you can get more improvement if you also do this delayed scheme
for the inode items themselves.
The hard part of these delayed implementations is always the throttling,
+ if (delayed_root->count >= root->leafsize / sizeof(*dir_item))
+ btrfs_run_delayed_dir_index(trans, root, NULL,
+ BTRFS_DELAYED_INSERT_ITEM, 0);
+
Have you experimented with other values here?
I need to take a hard look at the locking and do some benchmarking on
larger machines. I'm a little worried about increased lock contention,
but I think we can get around it by breaking up the rbtrees a little
later on if we need to.
-chris
next prev parent reply other threads:[~2010-12-02 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 8:09 [RFC PATCH 4/4] btrfs: implement delayed dir index insertion and deletion Miao Xie
2010-12-02 16:33 ` Chris Mason [this message]
2010-12-06 7:25 ` Miao Xie
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=1291307496-sup-6170@think \
--to=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=miaox@cn.fujitsu.com \
/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).