Re: tuning bgwriter in 8.4.2

Поиск
Список
Период
Сортировка
От Ben Chobot
Тема Re: tuning bgwriter in 8.4.2
Дата
Msg-id 08043919-7C7C-408E-A65E-C3F6647C2219@silentmedia.com
обсуждение исходный текст
Ответ на tuning bgwriter in 8.4.2  (Ben Chobot <bench@silentmedia.com>)
Список pgsql-general
On Feb 14, 2010, at 10:25 AM, Ben Chobot wrote:

We recently upgraded to 8.4.2 and I'm trying to make sure our bgwriter is working as well as it can. Based on:

# select * from pg_stat_bgwriter ;
 checkpoints_timed | checkpoints_req | buffers_checkpoint | buffers_clean | maxwritten_clean | buffers_backend | buffers_alloc 
-------------------+-----------------+--------------------+---------------+------------------+-----------------+---------------
               804 |               2 |           39171885 |         22562 |              211 |        24759656 |       4488627
(1 row)

...I'm not sure that it is, because as I understand things, assuming I don't keep updating the same pages then buffers_backend should be a small percentage of buffers_alloc, and buffers_clean should be larger than it is compared to buffers_checkpoint. Is my understanding correct?

My checkpoints are spread exactly 5 minutes apart, and a typical checkpoint log entry looks like:

checkpoint complete: wrote 48289 buffers (3.7%); 0 transaction log file(s) added, 0 removed, 14 recycled; write=149.872 s, sync=0.378 s, total=150.256 s

The only bgwriter tunable we've adjusted so far is bgwriter_lru_maxpages = 500, though we've also set checkpoint_segments = 768 (not that we need it that high, but we have the space on the wal volume.) 

I should have added that those 211 maxwritten_clean entries came about before we set bgwriter_lru_maxpages to 500. And the 2 requested checkpoints came with the initial slony load.

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

Предыдущее
От: Prasanna Sukumar
Дата:
Сообщение: Kerberos library update
Следующее
От: "Davor J."
Дата:
Сообщение: Re: Function that creates a custom (temporary) table AND returns a pointer to it = impossible in pg?