linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Jens Axboe <axboe@fb.com>
Cc: Austin S Hemmelgarn <ahferroin7@gmail.com>,
	linux-kernel@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 3/3] block: by default, limit maximum discard size to 64MB
Date: Wed, 15 Jul 2015 12:29:59 -0400	[thread overview]
Message-ID: <20150715162959.GA14196@redhat.com> (raw)
In-Reply-To: <55A67C9D.7000009@fb.com>

On Wed, Jul 15 2015 at 11:30am -0400,
Jens Axboe <axboe@fb.com> wrote:

> On 07/15/2015 05:46 AM, Austin S Hemmelgarn wrote:
> >On 2015-07-14 17:48, Jens Axboe wrote:
> >>On 07/14/2015 02:45 PM, Jens Axboe wrote:
> >>>On 07/14/2015 02:44 PM, Mike Snitzer wrote:
> >>>>On Tue, Jul 14 2015 at  2:48pm -0400,
> >>>>Jens Axboe <axboe@fb.com> wrote:
> >>>>
> >>>>>Lots of devices exhibit very high latencies for big discards, hurting
> >>>>>reads and writes. By default, limit the max discard we will build to
> >>>>>64MB. This value has shown good results across a number of devices.
> >>>>>
> >>>>>This will potentially hurt discard throughput, from a provisioning
> >>>>>point of view (when the user does mkfs.xfs, for instance, and mkfs
> >>>>>issues a full device discard). If that becomes an issue, we could
> >>>>>have different behavior for provisioning vs runtime discards.
> >>>>>
> >>>>>Signed-off-by: Jens Axboe <axboe@fb.com>
> >>>>
> >>>>Christoph suggested you impose this default for the specific
> >>>>drivers/devices that benefit.  I'm not following why imposing a 64MB
> >>>>default is the right thing to do for all devices.
> >>>
> >>>I'd argue that's most of them... But the testing we did was on NVMe. I
> >>>can limit it to NVMe, no big deal.
> >>
> >>Oh, and LSI flash too, so not just NVMe.
> >>
> >While I don't have time to test it, I have a feeling that such a limit
> >would help with many of the consumer SSD's out there.  Secondarily, once
> >this gets in and discard is fixed for BTRFS, I'll have some performance
> >testing to do WRT dm-thinp.
> 
> Right, that was the point of it. After more consideration, a default
> "sane" limit should be applied to any non-stacked device.

Sounds good.

For DM thinp, it can handle really large discards efficiently (without
passing discards down to the underlying data device).  But if/when
discard passdown is enabled it'll obviously split those larger discards
based on this new "sane" limit of the underlying data device.

Which would then potentially usher in the problem of discard latency
being high for DM thinp (if discard passdown is enabled).  But in
practice I doubt that will be much of a concern.  I'll keep both pieces
if I'm wrong ;)

  reply	other threads:[~2015-07-15 16:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 18:48 [PATCH 0/3 v2] Configurable max discard size Jens Axboe
2015-07-14 18:48 ` [PATCH 1/3] block: have drivers use blk_queue_max_discard_sectors() Jens Axboe
2015-07-16 14:46   ` Jeff Moyer
2015-07-14 18:48 ` [PATCH 2/3] block: make /sys/block/<dev>/queue/discard_max_bytes writeable Jens Axboe
2015-07-16 15:07   ` Jeff Moyer
2015-07-16 15:11     ` Jens Axboe
2015-07-14 18:48 ` [PATCH 3/3] block: by default, limit maximum discard size to 64MB Jens Axboe
2015-07-14 20:44   ` Mike Snitzer
2015-07-14 20:45     ` Jens Axboe
2015-07-14 21:48       ` Jens Axboe
2015-07-15 11:46         ` Austin S Hemmelgarn
2015-07-15 15:30           ` Jens Axboe
2015-07-15 16:29             ` Mike Snitzer [this message]
2015-07-15 22:14               ` Jens Axboe
2015-08-05 13:34                 ` Mike Snitzer

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=20150715162959.GA14196@redhat.com \
    --to=snitzer@redhat.com \
    --cc=ahferroin7@gmail.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@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).