From: Mark Fasheh <mfasheh@suse.de>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: Stefan Priebe <s.priebe@profihost.ag>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
jbacik@fb.com, Chris Mason <clm@fb.com>
Subject: Re: Regression in: [PATCH 4/4] btrfs: qgroup: account shared subtree during snapshot delete
Date: Thu, 5 Nov 2015 19:15:26 -0800 [thread overview]
Message-ID: <20151106031526.GJ15575@wotan.suse.de> (raw)
In-Reply-To: <563BFC15.4070705@cn.fujitsu.com>
On Fri, Nov 06, 2015 at 09:02:13AM +0800, Qu Wenruo wrote:
> >The same exact code ran in either case before and after your patches, so my
> >guess is that the issue is actually inside the qgroup code that shouldn't
> >have been run. I wonder if we even just filled up his memory but never
> >cleaned the objects. The only other thing I can think of is if
> >account_leaf_items() got run in a really tight loop for some reason.
> >
> >Kmalloc in the way we are using it is not usually a performance issue,
> >especially if we've been reading off disk in the same process. Ask yourself
> >this - your own patch series does the same kmalloc for every qgroup
> >operation. Did you notice a complete and massive performance slowdown like
> >the one Stefan reported?
>
> You're right, such memory allocation may impact performance but not
> so noticeable, compared to other operations which may kick disk IO,
> like btrfs_find_all_roots().
>
> But at least, enabling qgroup will impact performance.
>
> Yeah, this time I has test data now.
> In a environment with 100 different snapshot, sysbench shows an
> overall performance drop about 5%, and in some case, up to 7%, with
> qgroup enabled.
>
> Not sure about the kmalloc impact, maybe less than 1% or maybe 2~3%,
> but at least it's worthy trying to use kmem cache.
Ok cool, what'd you do to generate the snapshots? I can try a similar test
on one of my machines and see what I get. I'm not surprised that the
overhead is noticable, and I agree it's easy enough to try things like
replacing the allocation once we have a test going.
Thanks,
--Mark
--
Mark Fasheh
next prev parent reply other threads:[~2015-11-06 3:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-01 20:49 Regression in: [PATCH 4/4] btrfs: qgroup: account shared subtree during snapshot delete Stefan Priebe
2015-11-01 22:57 ` Duncan
2015-11-02 1:34 ` Qu Wenruo
2015-11-02 5:46 ` Stefan Priebe
2015-11-03 19:15 ` Mark Fasheh
2015-11-03 19:26 ` Mark Fasheh
2015-11-03 19:42 ` Stefan Priebe
2015-11-03 23:31 ` Mark Fasheh
2015-11-04 2:22 ` Chris Mason
2015-11-04 1:01 ` Qu Wenruo
2015-11-05 19:23 ` Mark Fasheh
2015-11-06 1:02 ` Qu Wenruo
2015-11-06 3:15 ` Mark Fasheh [this message]
2015-11-06 3:25 ` Qu Wenruo
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=20151106031526.GJ15575@wotan.suse.de \
--to=mfasheh@suse.de \
--cc=clm@fb.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
--cc=s.priebe@profihost.ag \
/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).