linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Progress indicator when (slowly) mounting a btrfs filesystem?
@ 2016-01-27 16:24 Christian Rohmann
  2016-01-27 21:00 ` bbrendon
  2016-01-27 23:47 ` Chris Murphy
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Rohmann @ 2016-01-27 16:24 UTC (permalink / raw)
  To: linux-btrfs

Hey btrfs-folks,

when one cuts the power to a machine with an 8 device RAID6 btrfs
mounted, it takes about 15 - 20 minutes to mount the btrfs again
afterwards. This is with kernel 4.4 and btrfs-progs 4.4 mind you. I
looked at iotop and it was reading from all disks heavily, so it was
doing something. The long mount time for such a rather expected case
might be a problem in itself, but either way, a mount action that takes
a while needs to present some sort of progress indication, so the user
knows what btrfs is at work getting things mounted.



Regards

Christian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Progress indicator when (slowly) mounting a btrfs filesystem?
  2016-01-27 16:24 Progress indicator when (slowly) mounting a btrfs filesystem? Christian Rohmann
@ 2016-01-27 21:00 ` bbrendon
  2016-01-27 23:47 ` Chris Murphy
  1 sibling, 0 replies; 5+ messages in thread
From: bbrendon @ 2016-01-27 21:00 UTC (permalink / raw)
  To: Christian Rohmann; +Cc: linux-btrfs

In my experience there are cases where the system does nothing and it
just appears to hang but leaving it overnight results in success.

Very strange indeed.

On Wed, Jan 27, 2016 at 8:24 AM, Christian Rohmann
<crohmann@netcologne.de> wrote:
> Hey btrfs-folks,
>
> when one cuts the power to a machine with an 8 device RAID6 btrfs
> mounted, it takes about 15 - 20 minutes to mount the btrfs again
> afterwards. This is with kernel 4.4 and btrfs-progs 4.4 mind you. I
> looked at iotop and it was reading from all disks heavily, so it was
> doing something. The long mount time for such a rather expected case
> might be a problem in itself, but either way, a mount action that takes
> a while needs to present some sort of progress indication, so the user
> knows what btrfs is at work getting things mounted.
>
>
>
> Regards
>
> Christian
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Progress indicator when (slowly) mounting a btrfs filesystem?
  2016-01-27 16:24 Progress indicator when (slowly) mounting a btrfs filesystem? Christian Rohmann
  2016-01-27 21:00 ` bbrendon
@ 2016-01-27 23:47 ` Chris Murphy
  2016-02-01 14:03   ` Christian Rohmann
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Murphy @ 2016-01-27 23:47 UTC (permalink / raw)
  To: Christian Rohmann; +Cc: Btrfs BTRFS

On Wed, Jan 27, 2016 at 9:24 AM, Christian Rohmann
<crohmann@netcologne.de> wrote:
> Hey btrfs-folks,
>
> when one cuts the power to a machine with an 8 device RAID6 btrfs
> mounted, it takes about 15 - 20 minutes to mount the btrfs again
> afterwards. This is with kernel 4.4 and btrfs-progs 4.4 mind you. I
> looked at iotop and it was reading from all disks heavily, so it was
> doing something. The long mount time for such a rather expected case
> might be a problem in itself, but either way, a mount action that takes
> a while needs to present some sort of progress indication, so the user
> knows what btrfs is at work getting things mounted.

Might be a bug, but more likely might be a lack of optimization. If it
eventually mounts without errors that's a pretty good plus. Lots of
file systems can't handle power failures well at all.

Mount is part of util-linux, not btrfs-progs, so any change would
probably need to be there. I'm not sure the kernel even has an idea
during all of this what the end point is, so a progress indication is
probably not reliable. It's in the clouds on a long staircase, or
maybe it's a short one, who can be sure?


-- 
Chris Murphy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Progress indicator when (slowly) mounting a btrfs filesystem?
  2016-01-27 23:47 ` Chris Murphy
@ 2016-02-01 14:03   ` Christian Rohmann
  2016-02-01 14:19     ` Austin S. Hemmelgarn
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Rohmann @ 2016-02-01 14:03 UTC (permalink / raw)
  To: Chris Murphy; +Cc: Btrfs BTRFS

Hey Chris,

On 01/28/2016 12:47 AM, Chris Murphy wrote:
> Might be a bug, but more likely might be a lack of optimization. If it
> eventually mounts without errors that's a pretty good plus. Lots of
> file systems can't handle power failures well at all.

So what and how should I go about profiling such a long running mount in
order to help finding point where optimization is needed the most then?

Just as a side note: I don't think it's your own expectation to be like
all those other file systems ;-)


Regards

Christian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Progress indicator when (slowly) mounting a btrfs filesystem?
  2016-02-01 14:03   ` Christian Rohmann
@ 2016-02-01 14:19     ` Austin S. Hemmelgarn
  0 siblings, 0 replies; 5+ messages in thread
From: Austin S. Hemmelgarn @ 2016-02-01 14:19 UTC (permalink / raw)
  To: Christian Rohmann, Chris Murphy; +Cc: Btrfs BTRFS

On 2016-02-01 09:03, Christian Rohmann wrote:
> Hey Chris,
>
> On 01/28/2016 12:47 AM, Chris Murphy wrote:
>> Might be a bug, but more likely might be a lack of optimization. If it
>> eventually mounts without errors that's a pretty good plus. Lots of
>> file systems can't handle power failures well at all.
>
> So what and how should I go about profiling such a long running mount in
> order to help finding point where optimization is needed the most then?
It would probably require some work with perf and ftrace, which means 
you likely need to build a special kernel just for testing, and then 
generate an ideally clean-room like environment (whatever hosting, plus 
userspace, plus a consistent filesystem image that you can reuse for 
each test, etc).

Kernel profiling is a decidedly non-trivial task, and is not something I 
would recommend somebody try unless both:
a) They already have a working knowledge of kernel internals, or are 
willing to learn.
b) They have the time and resources to do it right in a reproducible manner.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-01 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 16:24 Progress indicator when (slowly) mounting a btrfs filesystem? Christian Rohmann
2016-01-27 21:00 ` bbrendon
2016-01-27 23:47 ` Chris Murphy
2016-02-01 14:03   ` Christian Rohmann
2016-02-01 14:19     ` Austin S. Hemmelgarn

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).