All of lore.kernel.org
 help / color / mirror / Atom feed
From: pg@mdraid.list.sabi.co.UK (Peter Grandi)
To: list Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: use ssd as write-journal or lvm-cache?
Date: Wed, 17 Feb 2021 10:12:29 +0100	[thread overview]
Message-ID: <24620.56829.93946.65275@cyme.ty.sabi.co.uk> (raw)
In-Reply-To: <CAC6SzHLHq9yX+dtcYwYyhfoTufFYohg_ZMmaSv6-HVt4e-m-hA@mail.gmail.com>

> I was to use ssd to cache my mdadm-raid5 + lvm storage.

Not that sure that layering MDADM on top of DM/LVM2 is always a
good idea, I tend to prefer to keep things simple.

> but I wonder if I should use them as lvm-cache or mdadm write
> journal.  lvm-cache has benefits that it can do also
> read-cache. but I wonder if full-stripe write is the key point
> I need.

It depends on your load; does the small chance of RAID5 "write
hole" matter to your load? MDRAID has been used for a long time
without having a write journal, as the "write hole" issue
happens rarely and does not always matter. Anyhow with a write
journal, slow "resyncs" are avoided, which may also be
convenient (using the journal as a write buffer is not not that
coherent).

Also, the MDRAID write journal is usually (and should be) a lot
smaller than a whole flash SSD unit, so you can use a small part
of a flash SSD for write journaling and most of it for caching.

Whether caching is useful, and whether DM/LVM2 caching in
particular is useful, depends a lot on the specific load.

Apart from DM/LVM2 caching there is also "bcache", and there is
a new and fairly reliable filesystem type, "bcachefs", that
integrates it and gives quite neatly multiple tiers of storage
(it also has some RAID aspects, but those can be ignored).

https://www.reddit.com/r/bcachefs/comments/l44lmj/list_of_some_useful_links_for_bcachefs/

  parent reply	other threads:[~2021-02-17 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17  3:27 use ssd as write-journal or lvm-cache? d tbsky
2021-02-17  6:09 ` Roman Mamedov
2021-02-17  8:45   ` Peter Grandi
2021-02-17 10:17     ` Roman Mamedov
2021-02-17  8:52   ` d tbsky
2021-02-17  9:12 ` Peter Grandi [this message]
2021-02-17 13:50   ` d tbsky
2021-02-17 20:50     ` Peter Grandi
2021-02-17 18:03   ` antlists

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=24620.56829.93946.65275@cyme.ty.sabi.co.uk \
    --to=pg@mdraid.list.sabi.co.uk \
    --cc=linux-raid@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.