Re: Spread checkpoint sync

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Spread checkpoint sync
Дата
Msg-id 17863.1296491396@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Spread checkpoint sync  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Spread checkpoint sync  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> IMHO we should re-consider the patch to sort the writes. Not so much 
> because of the performance gain that gives, but because we can then 
> re-arrange the fsyncs so that you write one file, then fsync it, then 
> write the next file and so on.

Isn't that going to make performance worse not better?  Generally you
want to give the kernel as much scheduling flexibility as possible,
which you do by issuing the write as far before the fsync as you can.
An arrangement like the above removes all cross-file scheduling freedom.
For example, if two files are on different spindles, you've just
guaranteed that no I/O overlap is possible.

> That way we the time taken by the fsyncs 
> is distributed between the writes,

That sounds like you have an entirely wrong mental model of where the
cost comes from.  Those times are not independent.
        regards, tom lane


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Allowing multiple concurrent base backups
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Allowing multiple concurrent base backups