From: | Claudio Freire <klaussfreire(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: increasing the default WAL segment size |
Date: | 2016-08-25 16:55:58 |
Message-ID: | CAGTBQpZYUA3s+J4yviub9xYhfiDcWMQSgpA3LAGt-inf6fMApg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 25, 2016 at 12:21 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 25 August 2016 at 02:31, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
>> Furthermore, there is an enforced, synchronous fsync at the end of
>> every segment, which actually does hurt performance on write-heavy
>> workloads.[2] Of course, if that were the only reason to consider
>> increasing the segment size, it would probably make more sense to just
>> try to push that extra fsync into the background, but that's not
>> really the case. From what I hear, the gigantic number of files is a
>> bigger pain point.
>
> I think we should fully describe the problem before finding a solution.
>
> This is too big a change to just tweak a value without discussing the
> actual issue.
>
> And if the problem is as described, how can a change of x4 be enough
> to make it worth the pain of change? I think you're already admitting
> it can't be worth it by discussing initdb configuration.
>
> If we do have the pain of change, should we also consider making WAL
> files variable length? What do we gain by having the files all the
> same size? ISTM better to have WAL files that vary in length up to 1GB
> in size.
>
> (This is all about XLOG_SEG_SIZE; I presume XLOG_BLCKSZ can stay as it
> is, right?)
Avoiding variable sizes does avoid some failure modes on the
filesystem side in the face of crashes/power loss.
So making them variable size, while possible, wouldn't be simple at
all (it would involve figuring out the way filesystems behave when
facing crash when a file is changing in size).
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-08-25 16:59:37 | Re: increasing the default WAL segment size |
Previous Message | Kuntal Ghosh | 2016-08-25 16:41:01 | Re: WAL consistency check facility |