From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Brad Templeton <4brad@templetons.com>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs-transacti hangs system for several seconds every few minutes
Date: Sun, 29 Mar 2020 21:14:40 +0800 [thread overview]
Message-ID: <38a47c1a-d5b1-43c5-e026-10c2d4a9c039@gmx.com> (raw)
In-Reply-To: <c8513b49-1408-3d99-b1ff-95c36de2ef67@templetons.com>
[-- Attachment #1.1: Type: text/plain, Size: 2086 bytes --]
On 2020/3/29 下午12:03, Brad Templeton wrote:
> Not using qgroups. Not doing snapshots. Did a reboot with the
> options to upgrade to v2 -- it failed,
What did you mean about "it failed"
It failed to mount or something else showed up?
If failed to mount, would you like to shared the dmesg of that mount
failure?
> in that the disk check took more
> than 6 minutes,
Please be aware that, btrfs check, unlike e2fsck, will always check all
metadata of the fs, no matter if the fs is clean unmounted or not.
In fact, btrfs unlike other journal based fs, has no clear way to
determine if an fs is unmounted cleanly or not.
(Log tree is one method, but not a reliable one).
6 min looks completely valid to me.
> but it worked, and the second time I was able to boot,
> and -- knock on wood -- so far it has not hung.
If you hit the hang, you could try to use 'perf' command to try to probe
the runtime of btrfs_commit_transaction() and its major components.
It would be super helpful if we could determine which is the major cause.
>
> I wonder why they put 5.3.0 as the standard advanced Kernel in Ubuntu
> LTS if it has a data corruption bug. I don't know if I've seen any
> release of 5.4.14 in a PPA yet -- manual kernel install is such a pain
> the few times I have done it. I could revert, but the reason I switched
> to 5.3, not long ago, was another problem with sound drivers.
>
> BTW, even though it now works, it still takes 90 seconds every boot
> doing a disk check, even after what I think is a clean shutdown. I
> presume that is not normal, any clues on what may cause that?
>
Another thing I found is, in your initial report, your swap is heavily used.
I guess it may be related to the memory pressure, where every metadata
write needs to do a lot of metadata read before it can do anything.
If that's the case, it would be good to keep an eye on the memory
pressure to make sure fs can still have enough metadata cache without
triggering too much IO in its critical section.
Thanks,
Qu
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-03-29 13:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-29 4:03 btrfs-transacti hangs system for several seconds every few minutes Brad Templeton
2020-03-29 13:14 ` Qu Wenruo [this message]
2020-03-29 17:58 ` Brad Templeton
2020-03-29 18:09 ` Zygo Blaxell
-- strict thread matches above, loose matches on Subject: below --
2020-03-30 2:29 Tomasz Chmielewski
2020-03-30 5:56 ` Andrei Borzenkov
2020-03-30 8:11 ` Brad Templeton
2020-03-30 8:35 ` Tomasz Chmielewski
2020-03-31 4:20 ` Zygo Blaxell
2020-03-28 18:26 Brad Templeton
2020-03-28 21:20 ` Zygo Blaxell
[not found] ` <7778ece0-67d4-8d1c-b773-35f07d81dcbe@templetons.com>
2020-03-29 6:42 ` Zygo Blaxell
2020-03-30 22:14 ` Chris Murphy
2020-03-31 4:04 ` Zygo Blaxell
2020-03-29 0:58 ` 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=38a47c1a-d5b1-43c5-e026-10c2d4a9c039@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=4brad@templetons.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