Thread: server gets slow at certain time
I am using Postgresql 8.1 in 8-cpu cores with 32 gb ram with CestOS 5.
I have different DBs in the system and the large one is 12 GB and it is a CRM DB and heavily used.
Every day after 1 pm the system gets slow and after analyzing the nmon spreadsheet, I found that IO spike at that period.
Users write data much at that period of time.
DB parameters are as follows:
max_connections= 500shared_buffers=122144
effective_cache_size = 1835010
work_mem = 8192
max_fsm_pages= 356656
fsync=on
commit_delay=0
commit_siblings= 5
random_page_cost = 0.01
default_statistics_target=100
wah_buffers = 500
Any idea please how to find the bottleneck and improve performance.
Let me know if any more information is needed.
On 29 October 2010 13:24, AI Rumman <rummandba@gmail.com> wrote:
I am using Postgresql 8.1 in 8-cpu cores with 32 gb ram with CestOS 5.I have different DBs in the system and the large one is 12 GB and it is a CRM DB and heavily used.Every day after 1 pm the system gets slow and after analyzing the nmon spreadsheet, I found that IO spike at that period.Users write data much at that period of time.DB parameters are as follows:max_connections= 500
shared_buffers=122144
effective_cache_size = 1835010
work_mem = 8192
max_fsm_pages= 356656
fsync=on
commit_delay=0
commit_siblings= 5
random_page_cost = 0.01
default_statistics_target=100
wah_buffers = 500
Any idea please how to find the bottleneck and improve performance.
Let me know if any more information is needed.
What's your checkpoint_segments setting? You may wish to up it if you're getting many inserts/updates.
--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935
On Fri, 2010-10-29 at 18:24 +0600, AI Rumman wrote: > I am using Postgresql 8.1 in 8-cpu cores with 32 gb ram with CestOS 5. <snip> In addition to what Thom wrote, please note that checkpoints in pre-8.3 negative effect on disk I/O -- you may see spikes during checkpoints. -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
At present, checkpoint_segment=3 checkpoint_timeout=300 On 10/29/10, Thom Brown <thom@linux.com> wrote: > On 29 October 2010 13:24, AI Rumman <rummandba@gmail.com> wrote: > >> I am using Postgresql 8.1 in 8-cpu cores with 32 gb ram with CestOS 5. >> I have different DBs in the system and the large one is 12 GB and it is a >> CRM DB and heavily used. >> Every day after 1 pm the system gets slow and after analyzing the nmon >> spreadsheet, I found that IO spike at that period. >> Users write data much at that period of time. >> DB parameters are as follows: >> max_connections= 500 >> shared_buffers=122144 >> effective_cache_size = 1835010 >> work_mem = 8192 >> max_fsm_pages= 356656 >> fsync=on >> commit_delay=0 >> commit_siblings= 5 >> random_page_cost = 0.01 >> default_statistics_target=100 >> wah_buffers = 500 >> >> Any idea please how to find the bottleneck and improve performance. >> Let me know if any more information is needed. >> >> > What's your checkpoint_segments setting? You may wish to up it if you're > getting many inserts/updates. > > -- > Thom Brown > Twitter: @darkixion > IRC (freenode): dark_ixion > Registered Linux user: #516935 >
On 29 October 2010 14:34, AI Rumman <rummandba@gmail.com> wrote:
At present,
checkpoint_segment=3
checkpoint_timeout=300
I'd recommend at least setting checkpoint_segments to 12 and you might want to increase checkpoint_timeout too, although not too high. Maybe try doubling it.
And as Devrim pointed out, pre-8.3 versions suffer from these problems more, and 8.1 will cease to be supported in the near future, so if you're able to, upgrade. :)
Thom