Обсуждение: Proper Sizing of Shared Buffer Cache

Поиск
Список
Период
Сортировка

Proper Sizing of Shared Buffer Cache

От
"Don Kelloway"
Дата:
I'm a first-time user with PostgreSQL so please forgive my ignorance.

I've purchased (and read) Practical PostgreSQL (O'Reilly) and PostgreSQL
Essential Reference (New Riders).  So far, so good.  I think learning
PostgreSQL will not be as difficult as I thought it would be.  I've also
been googling for the last few days, but I have a question in regards to
determining the proper size of the buffer cache parameter.

http://www.postgresql.org/docs/aw_pgsql_book/hw_performance/node6.html

The above webpage states that ideally, the POSTGRESQL shared buffer cache
will be:

- Large enough to hold most commonly-accessed tables
- Small enough to avoid swap pagein activity

My question is how do you determine how large the most commonly-accessed
table(s) are?  I thought maybe I could view the pg_stat_database, but I
don't think that provides the answer I'm seeking.  Can someone point me in
the right direction?  It would be very much appreciated.

Best regards,
Don Kelloway



Re: Proper Sizing of Shared Buffer Cache

От
Richard Huxton
Дата:
Don Kelloway wrote:
> I'm a first-time user with PostgreSQL so please forgive my ignorance.
>
> I've purchased (and read) Practical PostgreSQL (O'Reilly) and PostgreSQL
> Essential Reference (New Riders).  So far, so good.  I think learning
> PostgreSQL will not be as difficult as I thought it would be.  I've also
> been googling for the last few days, but I have a question in regards to
> determining the proper size of the buffer cache parameter.

Another good reference point is
  http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html

The only real way to find the best value is by testing different values
against actual usage.

There's also a performance mailing list you might find useful. Archive
available on the website.
--
   Richard Huxton
   Archonet Ltd