public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: wal segment size
Date: Wed, 17 Dec 2025 12:23:15 -0500
Message-ID: <CANzqJaAXOGvS3sEN1o0xAkA1Ud0JmzBEuPSJiF0gOkVBgKFYog@mail.gmail.com> (raw)
In-Reply-To: <CAMon-aSkPs=N5GHJsOzLs5RKcrba3=ng_6HUEKZy1=1GJgCEqg@mail.gmail.com>
References: <CAMon-aQ8X7H7jCC6ggKm9Uzcu3KfGVC34RRqKt8BCfpDn2tq9A@mail.gmail.com>
	<[email protected]>
	<CAMon-aSkPs=N5GHJsOzLs5RKcrba3=ng_6HUEKZy1=1GJgCEqg@mail.gmail.com>

Adding this to ~/.ssh/config will almost totally eliminate the cost of ssh
authentication:

Host *
    ControlMaster auto
    #ControlPath /run/user/%i/%L_%r_at_%n:%p
    ControlPath ~/.ssh/%L_%r_at_%n:%p
    ControlPersist 5m

Pointing ControlPath to /run/user/%i is even faster, but it doesn't always
exist if you sudo into the postgres service account.

On Wed, Dec 17, 2025 at 11:10 AM Colin 't Hart <[email protected]> wrote:

> Thanks Laurenz, that confirms what I was assuming. Archiving is via
> pgbackrest to a backup server, over SSH. Approx 750ms to archive each
> segment is crazy -- I'll check compression parameters too.
>
> Any reason not to bump it up to 1GB? Or is that overkill?
>
> /Colin
>
> On Wed, 17 Dec 2025 at 16:25, Laurenz Albe <[email protected]>
> wrote:
>
>> On Wed, 2025-12-17 at 16:13 +0100, Colin 't Hart wrote:
>> > I see very little advice on tuning WAL segment size.
>> >
>> > One of my clients has a few datawarehouses at around 8 - 16 TB
>> >
>> > On one of the nodes there are approx 15000 WAL segments of 16MB each,
>> totalling
>> > approx 230GB. The archiver is archiving approx one per second, so
>> approx 4 hours to clear.
>> >
>> > Would we gain anything by bumping the WAL segment size?
>>
>> Very likely yes, if the problem is the overhead of starting the
>> archive_command.
>>
>> Another thing that can slow down archiving is if you compress these
>> segments
>> too aggressively.
>>
>> Yours,
>> Laurenz Albe
>>
>

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!


view thread (5+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: wal segment size
  In-Reply-To: <CANzqJaAXOGvS3sEN1o0xAkA1Ud0JmzBEuPSJiF0gOkVBgKFYog@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox