Re: Checkpoints and slow queries - Mailing list pgsql-performance

From Tomas Vondra
Subject Re: Checkpoints and slow queries
Date
Msg-id 535EBCEC.4000501@fuzzy.cz
Whole thread Raw
In response to Re: Checkpoints and slow queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Checkpoints and slow queries  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
On 28.4.2014 16:07, Tom Lane wrote:
> Elanchezhiyan Elango <elanelango@gmail.com> writes:
>>> The problem is that while this makes the checkpoints less
>>> frequent, it accumulates more changes that need to be written to
>>> disk during the checkpoint. Which means the impact more severe.
>
>> True. But the checkpoints finish in approximately 5-10 minutes
>> every time (even with checkpoint_completion_target of 0.9).
>
> There's something wrong with that.  I wonder whether you need to
> kick checkpoint_segments up some more to keep the checkpoint from
> being run too fast.
>
> Even so, though, a checkpoint spread over 5-10 minutes ought to
> provide the kernel with enough breathing room to flush things.  It
> sounds like the kernel is just sitting on the dirty buffers until it
> gets hit with fsyncs, and then it's dumping them as fast as it can.
> So you need some more work on tuning the kernel parameters.

There's certainly something fishy, because although this is the supposed
configuration:

checkpoint_segments = 250
checkpoint_timeout = 1h
checkpoint_completion_target = 0.9

the checkpoint logs typically finish in much shorter periods of time.
Like this, for example:




>
> regards, tom lane
>
>



pgsql-performance by date:

Previous
From: Karl Denninger
Date:
Subject: Re: Revisiting disk layout on ZFS systems
Next
From: Jeff Janes
Date:
Subject: Re: Checkpoints and slow queries