Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Leonidas Spyropoulos <artafinde@gmail.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Slow mounting raid1
Date: Tue, 1 Aug 2017 21:21:57 +0100	[thread overview]
Message-ID: <20170801202157.rdirjulcvmosuxze@tiamat> (raw)
In-Reply-To: <CAJtFHURKa-9oUty5Q4=oMGVVFR62AEH-qxo38VG0O5WCVziXqg@mail.gmail.com>

On 01/08/17, E V wrote:
> In general I think btrfs takes time proportional to the size of your
> metadata to mount. Bigger and/or fragmented metadata leads to longer
> mount times. My big backup fs with >300GB of metadata takes over
> 20minutes to mount, and that's with the space tree which is
> significantly faster then space cache v1.
> 
Hmm my raid1 doesn't seem near to full or has a significant Metadata so
I don't I'm on this case:
  # btrfs fi show /media/raid1/
  Label: 'raid1'  uuid: c9db91e6-0ba8-4ae6-b471-8fd4ff7ee72d
         Total devices 2 FS bytes used 516.18GiB
         devid    1 size 931.51GiB used 518.03GiB path /dev/sdd
         devid    2 size 931.51GiB used 518.03GiB path /dev/sde

  # btrfs fi df /media/raid1/
  Data, RAID1: total=513.00GiB, used=512.21GiB
  System, RAID1: total=32.00MiB, used=112.00KiB
  Metadata, RAID1: total=5.00GiB, used=3.97GiB
  GlobalReserve, single: total=512.00MiB, used=0.00B

I tried the space_cache=v2 just to see if it would do any
difference but nothing changed
  # cat /etc/fstab | grep raid1
  UUID=c9db91e6-0ba8-4ae6-b471-8fd4ff7ee72d   /media/raid1 btrfs   rw,noatime,compress=lzo,space_cache=v2         0 0
  # time umount /media/raid1 && time mount /media/raid1/

  real    0m0.807s
  user    0m0.237s
  sys     0m0.441s

  real    0m5.494s
  user    0m0.618s
  sys     0m0.116s

I did a couple of rebalances on metadata and data and it improved a bit:
  # btrfs balance start -musage=100 /media/raid1/
  # btrfs balance start -dusage=10 /media/raid1/
  [.. incremental dusage 10 -> 95]
  # btrfs balance start -dusage=95 /media/raid1

Down to 3.7 sec
  # time umount /media/raid1 && time mount /media/raid1/

  real    0m0.807s
  user    0m0.237s
  sys     0m0.441s

  real    0m3.790s
  user    0m0.430s
  sys     0m0.031s

I think maybe the next step is to disable compression if I want to mount
it faster. Is this normal for BTRFS that performance would degrade after
some time?

Regards,

-- 
Leonidas Spyropoulos

A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


  reply	other threads:[~2017-08-01 20:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 18:30 Slow mounting raid1 Leonidas Spyropoulos
2017-08-01  1:12 ` Duncan
2017-08-01  6:43   ` Leonidas Spyropoulos
2017-08-01 12:32     ` E V
2017-08-01 20:21       ` Leonidas Spyropoulos [this message]
2017-08-01 20:40         ` Timofey Titovets

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=20170801202157.rdirjulcvmosuxze@tiamat \
    --to=artafinde@gmail.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