Re: shared_buffers vs Linux file cache

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: shared_buffers vs Linux file cache
Дата
Msg-id 30353.1421364245@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: shared_buffers vs Linux file cache  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: shared_buffers vs Linux file cache
Список pgsql-performance
Jeff Janes <jeff.janes@gmail.com> writes:
> On Thu, Jan 15, 2015 at 3:30 AM, Huan Ruan <huan.ruan.it@gmail.com> wrote:
>> I thought 'shared_buffers' sets how much memory that is dedicated to
>> PostgreSQL to use for caching data, therefore not available to other
>> applications.

> While PostgreSQL has reserves the right to use 32GB, as long as PostgreSQL
> has not actually dirtied that RAM yet, then the kernel is free to keep
> using it to cache files.

Another thing to keep in mind is that, even if Postgres *has* used the
RAM, the kernel might decide to swap parts of it out if it's not being
used heavily.  This is pretty disastrous from a performance standpoint,
so it's advisable to not make shared_buffers very much larger than what
your application will keep "hot".

Ideally we'd lock the shared buffer arena into RAM to prevent that,
but such facilities are often unavailable or restricted to root.

            regards, tom lane


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Strange choice of general index over partial index
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Strange choice of general index over partial index