Re: PostgreSQL caching

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: PostgreSQL caching
Дата
Msg-id 40AE5248.8090807@samurai.com
обсуждение исходный текст
Ответ на Re: PostgreSQL caching  ("Rosser Schwarz" <rschwarz@totalcardinc.com>)
Список pgsql-performance
Rosser Schwarz wrote:
> PostgreSQL uses the operating system's disk cache.

... in addition to its own buffer cache, which is stored in shared
memory. You're correct though, in that the best practice is to keep the
PostgreSQL cache small and give more memory to the operating system's
disk cache.

> Pgsql uses the OS's disk cache instead of its own cache management
> because the former is more likely to persist.  If the postmaster
> managed the cache, as soon as the last connection died, the memory
> allocated for caching would be released, and all the cached data
> would be lost.

No; the cache is stored in shared memory. It wouldn't persist over
postmaster restarts (without some scheme of saving and restoring it),
but that has nothing to do with why the OS disk cache is usually kept
larger than the PG shared buffer cache.

-Neil


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

Предыдущее
От: Bill Montgomery
Дата:
Сообщение: Avoiding vacuum full on an UPDATE-heavy table
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: Avoiding vacuum full on an UPDATE-heavy table