From: Dave Hansen <dave@sr71.net>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>,
linux-btrfs@vger.kernel.org, Chris Mason <clm@fb.com>
Subject: Re: qgroup code slowing down rebalance
Date: Fri, 18 Mar 2016 09:33:42 -0700 [thread overview]
Message-ID: <56EC2DE6.2070006@sr71.net> (raw)
In-Reply-To: <56EB5399.3060403@cn.fujitsu.com>
On 03/17/2016 06:02 PM, Qu Wenruo wrote:
> Dave Hansen wrote on 2016/03/17 09:36 -0700:
>> On 03/16/2016 06:36 PM, Qu Wenruo wrote:
>>> Dave Hansen wrote on 2016/03/16 13:53 -0700:
>>>> I have a medium-sized multi-device btrfs filesystem (4 disks, 16TB
>>>> total) running under 4.5.0-rc5. I recently added a disk and needed to
>>>> rebalance. I started a rebalance operation three days ago. It was on
>>>> the order of 20% done after those three days. :)
>> ...
>> Data, RAID1: total=4.53TiB, used=4.53TiB
>> System, RAID1: total=32.00MiB, used=720.00KiB
>> Metadata, RAID1: total=17.00GiB, used=15.77GiB
>> GlobalReserve, single: total=512.00MiB, used=0.00B
>
> Considering the size and the amount of metadata, even doing a quota
> rescan will be quite slowing.
>
> Would you please try to do a quota rescan and see the CPU/IO usage?
I did a quota rescan. It uses about 80% of one CPU core, but also has
some I/O wait time and pulls 1-20MB/s of data off the disk (the balance
with quotas on was completely CPU-bound, and had very low I/O rates).
It would seem that the "quota rescan" *does* have the same issue as the
balance with quotas on, but to a much smaller extent than what I saw
with the "balance" operation.
I have a full profile recorded from the "quota rescan", but the most
relevant parts are pasted below. Basically btrfs_search_slot() and
radix tree lookups are eating all the CPU time, but they're still doing
enough I/O to see _some_ idle time on the processor.
> 74.55% 3.10% kworker/u8:0 [btrfs] [k] find_parent_nodes
> |
> ---find_parent_nodes
> |
> |--99.95%-- __btrfs_find_all_roots
> | btrfs_find_all_roots
> | btrfs_qgroup_rescan_worker
> | normal_work_helper
> | btrfs_qgroup_rescan_helper
> | process_one_work
> | worker_thread
> | kthread
> | ret_from_fork
> --0.05%-- [...]
>
> 32.14% 4.16% kworker/u8:0 [btrfs] [k] btrfs_search_slot
> |
> ---btrfs_search_slot
> |
> |--87.90%-- find_parent_nodes
> | __btrfs_find_all_roots
> | btrfs_find_all_roots
> | btrfs_qgroup_rescan_worker
> | normal_work_helper
> | btrfs_qgroup_rescan_helper
> | process_one_work
> | worker_thread
> | kthread
> | ret_from_fork
> |
> |--11.70%-- btrfs_search_old_slot
> | __resolve_indirect_refs
> | find_parent_nodes
> | __btrfs_find_all_roots
> | btrfs_find_all_roots
> | btrfs_qgroup_rescan_worker
> | normal_work_helper
> | btrfs_qgroup_rescan_helper
> | process_one_work
> | worker_thread
> | kthread
> | ret_from_fork
> --0.39%-- [...]
>
next prev parent reply other threads:[~2016-03-18 16:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 20:53 qgroup code slowing down rebalance Dave Hansen
2016-03-17 1:36 ` Qu Wenruo
2016-03-17 16:36 ` Dave Hansen
2016-03-18 1:02 ` Qu Wenruo
2016-03-18 16:33 ` Dave Hansen [this message]
2016-03-21 1:44 ` 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=56EC2DE6.2070006@sr71.net \
--to=dave@sr71.net \
--cc=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.