From: | Ben Chobot <bench(at)silentmedia(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | tuning bgwriter in 8.4.2 |
Date: | 2010-02-14 18:25:32 |
Message-ID: | 4D996615-ED60-41E4-9F8B-78AB16A812A6@silentmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.)
From | Date | Subject | |
---|---|---|---|
Next Message | Davor J. | 2010-02-14 18:35:24 | Re: Function that creates a custom (temporary) table AND returns a pointer to it = impossible in pg? |
Previous Message | dipti shah | 2010-02-14 17:16:51 | The easiest and robust way of configuring password pass through mechanism.. |