public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Rich Freeman <rich0@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Re: Re: [Gentoo-User] emerge --sync likely to kill SSD?
Date: Sun, 22 Jun 2014 09:44:14 -0400	[thread overview]
Message-ID: <CAGfcS_mQM8GyKpTspPHk8M0VCjo91npg1rFpuCw2_JpPQabu4Q@mail.gmail.com> (raw)
In-Reply-To: <35si7b-ghl.ln1@hurikhan77.spdns.de>

On Sun, Jun 22, 2014 at 7:44 AM, Kai Krakow <hurikhan77@gmail.com> wrote:
> I don't see where you could lose the volume management features. You just
> add device on top of the bcache device after you initialized the raw device
> with a bcache superblock and attached it. The rest works the same, just that
> you use bcacheX instead of sdX devices.

Ah, didn't realize you could attach/remove devices to bcache later.
Presumably it handles device failures gracefully, ie exposing them to
the underlying filesystem so that it can properly recover?

>
> From that point of view, I don't think something like ZIL should be
> implemented in btrfs itself but as a generic approach like bcache so every
> component in Linux can make use of it. Hot data relocation OTOH is
> interesting from another point of view and may become part of future btrfs
> as it benefits from knowledge about the filesystem itself, using a generic
> interface like "hot data tracking" in VFS - so other components can make use
> of that, too.

The only problem with doing stuff like this at a lower level (both
write and read caching) is that it isn't RAID-aware.  If you write
10GB of data, you use 20GB of cache to do it if you're mirrored,
because the cache doesn't know about mirroring.  Offhand I'm not sure
if there are any performance penalties as well around the need for
barriers/etc with the cache not being able to be relied on to do the
right thing in terms of what gets written out - also, the data isn't
redundant while it is on the cache, unless you mirror the cache.
Granted, if you're using it for write intent logging then there isn't
much getting around that.

> Having to prepare devices for bcache is kind of a show-stopper because it is
> no drop-in component that way. But OTOH I like that approach better than dm-
> cache because it protects from using the backing device without going
> through the caching layer which could otherwise severely damage your data,
> and you get along with fewer devices and don't need to size a meta device
> (which probably needs to grow later if you add devices, I don't know).

And this is the main thing keeping me away from it.  It is REALLY
painful to migrate to/from.  Having it integrated into the filesystem
delivers all the same benefits of not being able to mount it without
the cache present.

Now excuse me while I go fix my btrfs (I tried re-enabling snapper and
it again got the filesystem into a worked-up state after trying to
clean up half a dozen snapshots at the same time - it works fine until
you go and try to write a lot of data to it, then it stops syncing
though you don't necessarily notice until a few hours later when the
write cache exhausts RAM and on reboot your disk reverts back a few
hours).  I suspect that if I just treat it gently for a few hours
btrfs will clean up the mess and it will work normally again, but the
damage apparently persists after a reboot if you go heavy in the disk
too quickly...

Rich


  reply	other threads:[~2014-06-22 13:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19  2:36 [gentoo-user] [Gentoo-User] emerge --sync likely to kill SSD? microcai
2014-06-19  8:40 ` Amankwah
2014-06-19 11:44   ` Neil Bothwick
2014-06-19 11:56     ` Rich Freeman
2014-06-19 12:16       ` Kerin Millar
2014-06-19 22:03 ` Full Analyst
2014-06-20 17:48 ` [gentoo-user] " Kai Krakow
2014-06-21  4:54   ` microcai
2014-06-21 14:27   ` Peter Humphrey
2014-06-21 14:54     ` Rich Freeman
2014-06-21 19:19       ` [gentoo-user] " Kai Krakow
2014-06-21 19:24     ` Kai Krakow
2014-06-22  1:40       ` Rich Freeman
2014-06-22 11:44         ` [gentoo-user] " Kai Krakow
2014-06-22 13:44           ` Rich Freeman [this message]
2014-06-24 18:34             ` [gentoo-user] " Kai Krakow
2014-06-24 20:01               ` Rich Freeman

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=CAGfcS_mQM8GyKpTspPHk8M0VCjo91npg1rFpuCw2_JpPQabu4Q@mail.gmail.com \
    --to=rich0@gentoo.org \
    --cc=gentoo-user@lists.gentoo.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