From: | Kirill Reshke <reshke(at)double(dot)cloud> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Use fadvise in wal replay |
Date: | 2022-06-21 07:36:55 |
Message-ID: | CADVKa1WsQMBYK_02_Ji=pbOFnms+CT7TV6qJxDdHsFCiC9V_hw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers!
Recently we faced a problem with one of our production clusters. We use a
cascade replication setup in this cluster, that is: master, standby (r1),
and cascade standby (r2). From time to time, the replication lag on r1 used
to grow, while on r2 it did not. Analysys showed that r1 startup process
was spending a lot of time in reading wal from disk. Increasing
/sys/block/md2/queue/read_ahead_kb to 16384 (from 0) helps in this case.
Maybe we can add fadvise call in postgresql startup, so it would not be
necessary to change settings on the hypervisor?
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Use-fadvise-to-prefect-wal-in-xlogrecovery.patch | application/octet-stream | 935 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-06-21 07:43:55 | Re: Is RecoveryConflictInterrupt() entirely safe in a signal handler? |
Previous Message | Amit Langote | 2022-06-21 07:20:35 | Re: Replica Identity check of partition table on subscriber |