Re: Background writer process

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Background writer process
Дата
Msg-id 3FB40657.2080009@Yahoo.com
обсуждение исходный текст
Ответ на Re: Background writer process  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Background writer process
Список pgsql-hackers
Bruce Momjian wrote:

> Kurt Roeckx wrote:
>> On Thu, Nov 13, 2003 at 04:35:31PM -0500, Jan Wieck wrote:
>> > For sure the sync() needs to be replaced by the discussed fsync() of 
>> > recently written files. And I think the algorithm how much and how often 
>> > to flush can be significantly improved. But after all, this does not 
>> > change the real checkpointing at all, and the general framework having a 
>> > separate process is what we probably want.
>> 
>> Why is the sync() needed at all?  My understanding was that it
>> was only needed in case of a checkpoint.
> 
> He found that write() itself didn't encourage the kernel to write the
> buffers to disk fast enough.  I think the final solution will be to use
> fsync or O_SYNC.
> 

write() alone doesn't encourage the kernel to do any physical IO at all. 
As long as you have enough OS buffers, it does happy write caching until 
you checkpoint and sync(), and then the system freezes.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: cvs head? initdb?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Background writer process