linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brown <david@westcontrol.com>
To: linux-raid@vger.kernel.org
Subject: Re: Software RAID and TRIM
Date: Tue, 19 Jul 2011 12:22:35 +0200	[thread overview]
Message-ID: <j03m2p$jn1$1@dough.gmane.org> (raw)
In-Reply-To: <j03ipg$uqk$1@dough.gmane.org>

On 19/07/2011 11:29, Lutz Vieweg wrote:
> On 07/18/2011 10:18 PM, David Brown wrote:
>> You don't need to fill an erase block for writing - writes are done
>> as write blocks (I think 4K is the norm).
>
> You are right on that. Those sectors in a partially used erase block
> that have not been written to since the last erase of the whole erase
> block can be written to as good as sectors in completely empty erase
> blocks.
>
>
>> My main point about TRIM being expensive is the effect it has on
>> the block IO queue, regardless of the implementation in the SSD.
>
> Because of those effects on the block-IO-queue, the user-space
> work-around we implemented to discard the SSDs our RAID-1s consist of
> will not discard "one area on all SSDs at a time", but rather iterate
> first through all unused areas on one SSD, then iterate through the
> same list of areas on the second SSD.
>

Do you take the arrays off-line during this process, or at least make
them read-only?  If not, how do you ensure that the lists are valid?

> The effect of this is very much to our liking: While we can see
> near-100%-utilization on one SSD at a time during the discards, the
> other SSD will happily service the readers, and even the writes that
> go to the /dev/md* device are buffered in main memory long enough
> that we do not really see a significantly bad impact on the service.
> (This might be different, though, if the discards were done during
> peak-write-load times of the day.)
>
>
>> I really hope your SSD's return zeros for TRIM'ed blocks
>
> For RAID-1, the only consequence of not doing so is just that
> "data-check" runs may result in a > 0 mismatch_cnt. It does not
> destroy any of your data, and as long as I have two SSDs in a RAID,
> both of which give a non-error result when reading a sector, I would
> have no indication of "which of the returned sector contents to
> prefer", anyway.
>
> (I admit that for health monitoring it is useful to have a meaningful
>  mismatch_cnt.)
>
>> and that you are sure all your TRIMs are in full raid stripes -
>> otherwise you will /seriously/ mess up your raid arrays.
>
> Again, for RAID0/1 (even 10) I don't see why this would harm any
> data.
>

Fair enough for RAID1.  Just don't try it with RAID5!



  reply	other threads:[~2011-07-19 10:22 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 15:31 Software RAID and TRIM Tom De Mulder
2011-06-28 16:11 ` Mathias Burén
2011-06-29 10:32   ` Tom De Mulder
2011-06-29 10:45     ` NeilBrown
2011-06-29 11:10       ` Tom De Mulder
2011-06-29 11:48         ` Scott E. Armitage
2011-06-29 12:46           ` Roberto Spadim
2011-06-29 12:46       ` David Brown
2011-06-30  0:28         ` NeilBrown
2011-06-30  7:50           ` David Brown
2011-06-29 13:39       ` Namhyung Kim
2011-06-30  0:27         ` NeilBrown
2011-07-17 22:11       ` Lutz Vieweg
2011-07-17 21:57     ` Lutz Vieweg
2011-06-29 10:33   ` Tom De Mulder
2011-06-29 12:42     ` David Brown
2011-06-29 12:55       ` Tom De Mulder
2011-06-29 13:02         ` Roberto Spadim
2011-06-29 13:10         ` David Brown
2011-06-30  5:51         ` Mikael Abrahamsson
2011-07-04  9:13           ` Tom De Mulder
2011-07-04 16:26             ` Werner Fischer
2011-07-17 22:31               ` Lutz Vieweg
2011-07-17 22:16         ` Lutz Vieweg
2011-07-17 22:00     ` Lutz Vieweg
2011-06-28 16:17 ` Johannes Truschnigg
2011-06-28 16:40 ` David Brown
2011-07-17 21:52   ` Lutz Vieweg
2011-07-18  5:14     ` Mikael Abrahamsson
2011-07-18 10:35     ` David Brown
2011-07-18 10:48       ` Tom De Mulder
2011-07-18 18:09       ` Lutz Vieweg
2011-07-18 20:18         ` David Brown
2011-07-19  9:29           ` Lutz Vieweg
2011-07-19 10:22             ` David Brown [this message]
2011-07-19 13:41               ` Lutz Vieweg
2011-07-19 15:06                 ` David Brown
2011-07-20 10:39                   ` Lutz Vieweg
2011-07-19 14:19               ` Tom De Mulder
2011-07-20  7:42                 ` David Brown
2011-07-20 12:20                   ` Lutz Vieweg
2011-07-20 12:13                 ` Werner Fischer
2011-07-20 12:25                   ` Lutz Vieweg
2011-07-18 10:53     ` Tom De Mulder
2011-07-18 12:13       ` Werner Fischer

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='j03m2p$jn1$1@dough.gmane.org' \
    --to=david@westcontrol.com \
    --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).