linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai Krakow <hurikhan77@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: Very slow balance / btrfs-transaction
Date: Sat, 4 Feb 2017 22:10:51 +0100	[thread overview]
Message-ID: <20170204221051.664ada65@jupiter.sol.kaishome.de> (raw)
In-Reply-To: 1f5f66cfa8eca19b7e612e3b4745d788@85337f6d4fa4

Am Sat, 04 Feb 2017 20:50:03 +0000
schrieb "Jorg Bornschein" <jb@capsec.org>:

> February 4, 2017 1:07 AM, "Goldwyn Rodrigues" <rgoldwyn@suse.de>
> wrote:
> 
> > Yes, please check if disabling quotas makes a difference in
> > execution time of btrfs balance.  
> 
> Just FYI: With quotas disabled it took ~20h to finish the balance
> instead of the projected >30 days. Therefore, in my case, there was a
> speedup of factor ~35.
> 
> 
> and thanks for the quick reply! (and for btrfs general!)
> 
> 
> BTW: I'm wondering how much sense it makes to activate the underlying
> bcache for my raid1 fs again. I guess btrfs chooses randomly (or
> based predicted of disk latency?) which copy of a given extend to
> load?

As far as I know, it uses PID modulo only currently, no round-robin,
no random value. There are no performance optimizations going into btrfs
yet because there're still a lot of ongoing feature implementations.

I think there were patches to include a rotator value in the stripe
selection. They don't apply to the current kernel. I tried it once and
didn't see any subjective difference for normal desktop workloads. But
that's probably because I use RAID1 for metadata only.

MDRAID uses stripe selection based on latency and other measurements
(like head position). It would be nice if btrfs implemented similar
functionality. This would also be helpful for selecting a disk if
there're more disks than stripesets (for example, I have 3 disks in my
btrfs array). This could write new blocks to the most idle disk always.
I think this wasn't covered by the above mentioned patch. Currently,
selection is based only on the disk with most free space.

> I guess that would mean the effective cache size would only be
> half of the actual cache-set size (+-additional overhead)? Or does
> btrfs try a deterministically determined copy of each extend first? 

I'm currently using 500GB bcache, it helps a lot during system start -
and probably also while using using the system. I think that bcache
mostly caches metadata access which should improve a lot of btrfs
performance issues. The downside of RAID1 profile is, that probably
every second access is a cache-miss unless it has already been cached.
Thus, it's only half-effective as it could be.

I'm using write-back bcache caching, and RAID0 for data (I do daily
backups with borgbackup, I can easily recover broken files). So
writing with bcache is not such an issue for me. The cache is big
enough that double metadata writes are no problem.


-- 
Regards,
Kai

Replies to list-only preferred.


  reply	other threads:[~2017-02-04 21:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 22:13 Very slow balance / btrfs-transaction jb
2017-02-03 23:25 ` Goldwyn Rodrigues
2017-02-04  0:30 ` Jorg Bornschein
2017-02-04  1:07   ` Goldwyn Rodrigues
2017-02-04  1:47   ` Jorg Bornschein
2017-02-04  2:55     ` Lakshmipathi.G
2017-02-04  8:22       ` Duncan
2017-02-06  1:45     ` Qu Wenruo
2017-02-06 16:09       ` Goldwyn Rodrigues
2017-02-07  0:22         ` Qu Wenruo
2017-02-07 15:55           ` Filipe Manana
2017-02-08  0:39             ` Qu Wenruo
2017-02-08 13:56               ` Filipe Manana
2017-02-09  1:13                 ` Qu Wenruo
2017-02-06  9:14     ` Jorg Bornschein
2017-02-06  9:29       ` Qu Wenruo
2017-02-04 20:50   ` Jorg Bornschein
2017-02-04 21:10     ` Kai Krakow [this message]
2017-02-06 13:19       ` Austin S. Hemmelgarn
2017-02-07 19:47         ` Kai Krakow
2017-02-07 19:58           ` Austin S. Hemmelgarn
  -- strict thread matches above, loose matches on Subject: below --
2017-07-01 14:24 Sidney San Martín

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=20170204221051.664ada65@jupiter.sol.kaishome.de \
    --to=hurikhan77@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;
as well as URLs for NNTP newsgroup(s).