Re: [6.2 regression][bisected]discard storm on idle since v6.1-rc8-59-g63a7cb130718 discard=async

Christoph Hellwig
2023-03-22T08:38:52Z

On Tue, Mar 21, 2023 at 05:26:49PM -0400, Josef Bacik wrote:
> We got the defaults based on our testing with our workloads inside of
> FB. Clearly this isn't representative of a normal desktop usage, but
> we've also got a lot of workloads so figured if it made the whole
> fleet happy it would probably be fine everywhere.
>
> That being said this is tunable for a reason, your workload seems to
> generate a lot of free'd extents and discards. We can probably mess
> with the async stuff to maybe pause discarding if there's no other
> activity happening on the device at the moment, but tuning it to let
> more discards through at a time is also completely valid. Thanks,

FYI, discard performance differs a lot between different SSDs.
It used to be pretty horrible for most devices early on, and then a
certain hyperscaler started requiring decent performance for enterprise
drives, so many of them are good now. A lot less so for the typical
consumer drive, especially at the lower end of the spectrum.

And that jut NVMe, the still shipping SATA SSDs are another different
story. Not helped by the fact that we don't even support ranged
discards for them in Linux.