From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tiemen Ruiten <t(dot)ruiten(at)tech-lab(dot)io> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: checkpoints taking much longer than expected |
Date: | 2019-06-14 15:43:50 |
Message-ID: | 20190614154350.GE2480@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Greetings,
* Tiemen Ruiten (t(dot)ruiten(at)tech-lab(dot)io) wrote:
> checkpoint_timeout = 60min
That seems like a pretty long timeout.
> My problem is that checkpoints are taking a long time. Even when I run a
> few manual checkpoints one after the other, they keep taking very long, up
> to 10 minutes:
You haven't said *why* this is an issue... Why are you concerned with
how long it takes to do a checkpoint?
> 2019-06-14 15:21:10.351 CEST [23657] LOG: checkpoint starting: immediate
> force wait
> 2019-06-14 15:25:57.655 CEST [23657] LOG: checkpoint complete: wrote
> 139831 buffers (13.3%); 0 WAL file(s) added, 148 removed, 40 recycled;
> write=284.751 s, sync=0.532 s, total=287.304 s; sync files=537,
> longest=0.010 s, average=0.000 s; distance=2745065 kB, estimate=2841407 kB
> 2019-06-14 15:26:01.988 CEST [23657] LOG: checkpoint starting: immediate
> force wait
> 2019-06-14 15:30:30.430 CEST [23657] LOG: checkpoint complete: wrote
> 238322 buffers (22.7%); 0 WAL file(s) added, 0 removed, 172 recycled;
> write=264.794 s, sync=0.415 s, total=268.441 s; sync files=378,
> longest=0.011 s, average=0.001 s; distance=2834018 kB, estimate=2840668 kB
> 2019-06-14 15:30:44.097 CEST [23657] LOG: checkpoint starting: immediate
> force wait
> 2019-06-14 15:37:01.438 CEST [23657] LOG: checkpoint complete: wrote
> 132286 buffers (12.6%); 0 WAL file(s) added, 54 removed, 96 recycled;
> write=366.614 s, sync=2.975 s, total=377.341 s; sync files=467,
> longest=0.095 s, average=0.006 s; distance=2444291 kB, estimate=2801030 kB
>
> What is going on? It doesn't seem like normal behaviour?
The time information is all there and it tells you what it's doing and
how much had to be done... If you're unhappy with how long it takes to
write out gigabytes of data and fsync hundreds of files, talk to your
storage people...
Thanks,
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Peter J. Holzer | 2019-06-14 16:22:09 | Re: checkpoints taking much longer than expected |
Previous Message | Stephen Frost | 2019-06-14 15:36:45 | Re: checkpoints taking much longer than expected |