Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule? - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?
Date
Msg-id alpine.DEB.2.10.1601170855260.18181@sto
Whole thread Raw
In response to Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
> Coming in late here, but I always thought the fact that the FPW happen
> mostly at the start of the checkpoint, and the checkpoint writes/fsyncs
> happen mostly in the first half of the checkpoint period was always
> suboptimal, i.e. it would be nice of one of these was more active in the
> second half of the checkpoint period.  I assume that is what is being
> discussed here.

Yes, this is the subject of the thread.

On the one end hand, whether is the first half or first quarter of first 
tenth really depends on the actual load, so how much to rebalance depends 
on that dynamic information. At the beginning there should be a short 
spike for index pages which are quickly reused, and a longer spike about 
data pages depending on the pattern of access and size of table.

On the other hand the rebalancing also depends on the measure chosen to 
know about the overall progress, either WAL writing or time, and their 
behavior is not the same, so this should be taken into account.

My conclusion is that there is no simple static fix to this issue, as 
proposed in the submitted patch. The problem needs thinking and maths.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: count_nulls(VARIADIC "any")
Next
From: Andreas Seltenreich
Date:
Subject: [PATCH] Improve spinlock inline assembly for x86.