| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | OMPRAKASH SAHU <sahuop2121(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org |
| Subject: | Re: WAL replay is too slow on secondary server |
| Date: | 2025-10-30 10:03:40 |
| Message-ID: | 1e134f4d86881e35dad2147654d49735044eb40a.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
On Thu, 2025-10-30 at 10:06 +0530, OMPRAKASH SAHU wrote:
> We have a postgresql cluster setup using patroni.
> The DB is being used for heavy transactional application, now the problem is that on replica server WAL replay is too slow.
> We have increased the IOPS to 6k and Throughput to 600 on nvme EBS volume of wal directory and 10k &800 on data directory.
>
> but the WAL is being accumulated on the replica as usual and applying wal is having no improvement.
> changed the maintenance_io_concurrency on replica to 32.
> CPU utilization max=20% , RAM utilization is also max 20.
Is the disk saturated?
> I would request your thoughts and suggestions if we can get rid of this slowness and get some speed.
WAL replay during streaming replication is single-threaded.
So you can only use a faster CPU or disk, depending on what is the bottleneck.
Perhaps your shared buffers are too small, and you have cache contention.
Yours,
Laurenz Albe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Shubhang Joshi | 2025-10-30 11:38:06 | Re: WAL replay is too slow on secondary server |
| Previous Message | Edwin UY | 2025-10-30 09:30:00 | Replication Question / Issue - PRIMARY with SYNC and ASYNC Replication |