Re: Question about logbsize default value

Gionatan Danti
2019-10-25T07:23:23Z

On 24/10/19 23:50, Dave Chinner wrote:
> On Wed, Oct 23, 2019 at 11:40:33AM +0200, Gionatan Danti wrote:
> Defaults are for best compatibility and general behaviour, not
> best performance. A log stripe unit of 32kB allows the user to
> configure a logbsize appropriate for their workload, as it supports
> logbsize of 32kB, 64kB, 128kB and 256kB. If we chose 256kB as the
> default log stripe unit, then you have no opportunity to set the
> logbsize appropriately for your workload.
>
> remember, LSU determines how much padding is added to every non-full
> log write - 32kB pads out ot 32kB, 256kB pads out to 256kB. Hence if
> you have a workload that frequnetly writes non-full iclogs (e.g.
> regular fsyncs) then a small LSU results in much better performance
> as there is less padding that needs to be initialised and the IOs
> are much smaller.
>
> Hence for the general case (i.e. what the defaults are aimed at), a
> small LSU is a much better choice. you can still use a large
> logbsize mount option and it will perform identically to a large LSU
> filesystem on full iclog workloads (like the above fsmark workload
> that doesn't use fsync). However, a small LSU is likely to perform
> better over a wider range of workloads and storage than a large LSU,
> and so small LSU is a better choice for the default....

Hi Dave, thank you for your explanation. The observed behavior of a
large LSU surely matches what you described - less-than-optimal fsync perf.

That said, I was wondering why *logbsize* (rather than LSU) has a low
default of 32k (or, better, its default is to match LSU size). If I
understand it correctly, a large logbsize (eg: 256k) on top of a small
LSU (32k) would give high performance on both full-log-writes and
partial-log-writes (eg: frequent fsync).

Is my understanding correct? If you, do you suggest to always set
logbsize to the maximum supported value?

Thanks.