Re: Questions on query planner, join types, and work_mem

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Questions on query planner, join types, and work_mem
Дата
Msg-id 4C59BCA8.2060603@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Questions on query planner, join types, and work_mem  (Hannu Krosing <hannu@2ndquadrant.com>)
Ответы Re: Questions on query planner, join types, and work_mem  (Greg Smith <greg@2ndquadrant.com>)
Re: Questions on query planner, join types, and work_mem  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Questions on query planner, join types, and work_mem  (Hannu Krosing <hannu@krosing.net>)
Список pgsql-performance
Hannu Krosing wrote:
> There was ample space for keeping the indexes in linux cache (it has 1GB
> cached currently) though the system may have decided to start writing it
> to disk, so I suspect that most of the time was spent copying random
> index pages back and forth between shared buffers and disk cache.
>

Low shared_buffers settings will result in the same pages more often
being written multiple times per checkpoint, particularly index pages,
which is less efficient than keeping in the database cache and updating
them there.  This is a slightly different issue than just the overhead
of copying them back and forth; by keeping them in cache, you actually
reduce writes to the OS cache.  What I do to quantify that is...well,
the attached shows it better than I can describe; only works on 9.0 or
later as it depends on a feature I added for this purpose there.  It
measures exactly how much buffer cache churn happened during a test, in
this case creating a pgbench database.

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Questions on query planner, join types, and work_mem
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Questions on query planner, join types, and work_mem