linux-raid.vger.kernel.org archive mirror
 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 21:50:30 +0100	[thread overview]
Message-ID: <24621.33174.413582.234150@cyme.ty.sabi.co.uk> (raw)
In-Reply-To: <CAC6SzH+ai5jD8ZQi2f-vTYjBGWDshXJVVm+xM9KZ3OCjk5Sz4g@mail.gmail.com>

> I thought journal write-back mode should use large ssd
> space,like bcache which will prevent random write at all cost.

The write journal is supposed to buffer a few stripes to avoid
the write hole. Consider the case of a 2-drive write journal
arrangement: you would be effectively adding a RAID1 component
to your RAID5 set for recently updated data. Then why use RAID5?
Also consider the size of journals for filesystem types that
have it: typically it is 32MiB-128MiB.

> but reading the document again, it said "The flush conditions
> could be free in-kernel memory cache space is low".

That's another issue with the Linux default for the buffer
system, it usually buffers too much if there is no 'sync'.

> since the memory won't be too large compare to normal ssd
> disk,

I am not sure I understand why that is relevant, what happens
there depends on 'sync' behaviour and the filesystem and buffer
cache flushing interval if any.

> maybe a small optane ssd is best for mdadm write-journal.

The reasoning before this I don't quite understand, but Optane
is a very good choice for a persistent write buffer, as it is
not volatile and has much faster and smaller writes than flash
chips.

  reply	other threads:[~2021-02-17 20:51 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
2021-02-17 13:50   ` d tbsky
2021-02-17 20:50     ` Peter Grandi [this message]
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=24621.33174.413582.234150@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 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).