I am using Postgresql 8.2.13 and I found that most of the commits and insert or update statements are taking more than 4s in the db and the app performance is slow for that.
My db settings are as follows;
bgwriter_all_maxpages | 300 |
bgwriter_all_percent | 15 |
bgwriter_delay | 300 | ms
bgwriter_lru_maxpages | 50 |
bgwriter_lru_percent | 10 |
SHOW checkpoint_segments ;
checkpoint_segments
---------------------
300
(1 row)
show work_mem ;
work_mem
----------
16MB
(1 row)
show checkpoint_timeout ;
checkpoint_timeout
--------------------
5min
(1 row)
show checkpoint_warning ;
checkpoint_warning
--------------------
30s
(1 row)
show shared_buffers ;
shared_buffers
----------------
4GB
(1 row)
I have 32 gb RAM and its a 4*2=8 core processors.
Any idea how to improve the performance?