From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Majid Garoosi <amoomajid99(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: GUCifying MAX_WAL_SEND |
Date: | 2024-01-10 22:55:29 |
Message-ID: | ZZ8gYTJekItZ2uJ2@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 11, 2024 at 01:15:48AM +0330, Majid Garoosi wrote:
> Why do I think it can be beneficial to GUCify it?
> We use Postgres in K8s along with RBD disks. Today, I found out that
> because we use remote disks, it's better to read bigger chunks of data from
> the disk in one operation. In our setup (which I assume is not a silly
> setup), we had a query that took 4.5 seconds to execute on the primary
> server and ~21 seconds to send the WAL records to our synchronous standby
> server. After recompiling Postgres and setting MAX_WAL_SEND to 16MiB, that
> 21 seconds decreased to just 1.5 seconds, which is a 92.9% improvement.
I did not follow the older thread, but MAX_SEND_SIZE does not stress
me as a performance bottleneck in walsender.c when we use it for
calculations with the end LSN, so I can get behind the argument of
GUC-ifying it when reading WAL data in batches, even if it can be easy
to get it wrong. The hardcoded value comes back to 40f908bdcdc7 back
in 2010, and hardware has evolved a lot since that point.
So I'd +1 your suggestion. A RBD setup sounds exotic to me for a
database, though :)
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Verite | 2024-01-10 22:56:23 | Re: Built-in CTYPE provider |
Previous Message | Jelte Fennema-Nio | 2024-01-10 22:53:50 | Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs |