Re: Change default of checkpoint_completion_target

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Change default of checkpoint_completion_target
Дата
Msg-id 20210115224116.ekcz5g7y6kbb5fmz@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Change default of checkpoint_completion_target  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
Hi,

On 2021-01-15 23:05:02 +0100, Tomas Vondra wrote:
> Yeah. The flushing probably makes that mostly unnecessary, but we still
> allow disabling that. I'm not really convinced replacing it with a
> compile-time #define is a good idea, exactly because it can't be changed
> if needed.

It's also not available everywhere...


> As for the exact value, maybe the right solution is to make it dynamic.
> The usual approach is to leave "enough time" for the kernel to flush
> dirty data, so we could say 60 seconds and calculate the exact target
> depending on the checkpoint_timeout.

IME the kernel flushing at some later time precisely is the problem,
because of the latency spikes that happen when it decides to do so. That
commonly starts to happen well before the fsyncs. The reason that
setting a very small checkpoint_completion_target can help is that it
condenses the period of unrealiable performance into one short time,
rather than spreading it over the whole checkpoint...

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Key management with tests
Следующее
От: Tom Lane
Дата:
Сообщение: Re: poc - possibility to write window function in PL languages