Re: How to speed WAL apply in destination

From: Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com>
To: srinivas oguri <srinivasoguri7(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: How to speed WAL apply in destination
Date: 2022-12-12 03:36:29
Message-ID: 771c8913-f10e-892d-7b00-d71ca84ce7b5@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 12/11/22 22:02, srinivas oguri wrote:
> Hi,
>
> We are facing similar problems but the lag is at replay on standby.
> How can I troubleshoot the replay lag.
>
> Thanks
> Srinivas

Well, replay uses CPU and disk I/O. You should monitor both using the OS
tools. On Linux, Slowaris and AIX, that would be top, atop, iotop, sar,
iostat, nmon, dstat and alike. Also perf tools "perf top" are useful. On
Windows, that would be the performance monitor. You first have to figure
out where exactly is the bottleneck. Then I would go about looking for
newer version that has improved on WAL replay. For instance, PostgreSQL
15 can do parallel replay, which should speed things up, at least a bit.
Then, you should test the new version. After that you should decide
whether to beef up the hardware with or without upgrade. At any rate,
you should treat that like a project. Create a project plan, define
milestones, define how you test and what you test and give it a go. You
didn't specify the Postgres version or the OS, so a generic answer like
this is the best I can come up with. Second best would be the answer to
the question of life, universe and everything. Good luck!

--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Raghvendra Choudhary 2022-12-12 11:40:50 Re: How to speed WAL apply in destination
Previous Message srinivas oguri 2022-12-12 03:02:18 Re: How to speed WAL apply in destination