Re: checkpointer continuous flushing

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: checkpointer continuous flushing
Дата
Msg-id alpine.DEB.2.10.1506080951480.5519@sto
обсуждение исходный текст
Ответ на Re: checkpointer continuous flushing  (Cédric Villemain <cedric@2ndQuadrant.com>)
Список pgsql-hackers
Hello Cédric,

> It looks a bit hazardous, do you have a benchmark for freeBSD ?

No, I just consulted the FreeBSD man page for posix_fadvise. I someone can 
run tests on something which HDDs is not linux, that would be nice.

> Sources says:
>     case POSIX_FADV_DONTNEED:
>         /*
>          * Flush any open FS buffers and then remove pages
>          * from the backing VM object.  Using vinvalbuf() here
>          * is a bit heavy-handed as it flushes all buffers for
>          * the given vnode, not just the buffers covering the
>          * requested range.

It is indeed heavy-handed, but that would probably trigger the expected 
behavior which is to start writing to disk, so I would expect to see 
benefits similar to those of "sync_file_range" on Linux.

Buffer writes from bgwriter & checkpointer are throttled, which reduces 
the potential impact of a "heavy-handed" approach in the kernel.

Now if on some platforms the behavior is absurd, obviously it would be 
better to turn the feature off on those.

Note that this is already used by pg in "initdb", but the impact would 
probably be very small anyway.

-- 
Fabien.

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

Предыдущее
От: Cédric Villemain
Дата:
Сообщение: Re: checkpointer continuous flushing
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: pg_stat_archiver issue with aborted archiver