Re: how to calculate checkpoint_segments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Himanshu Baweja <himanshubaweja(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to calculate checkpoint_segments
Date: 2005-05-11 16:21:16
Message-ID: 5404.1115828476@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Himanshu Baweja <himanshubaweja(at)yahoo(dot)com> writes:
> i am trying to optimise postgres 8 running on a system.... is there any way to know how wht should be the value of checkpoint_segments...

Enough so you usually aren't checkpointing more often than is specified
by checkpoint_timeout. If you do not know what your system's normal
consumption of WAL is, try setting checkpoint_warning to the same value
as checkpoint_timeout and then keep an eye on the postmaster log to see
how often it complains. You really really *don't* want the thing
checkpointing more often than once every five or ten or so minutes.

> increasing checkpoint_segments degrade the performace while checkpointing as it will have a whole lot of dirty buffers to write.....

This is a fundamental misconception --- the bgwriter exists to prevent that.

See the pgsql-performance archives for more information.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Murtagh 2005-05-11 16:40:45 Re: Trigger that spawns forked process
Previous Message Alban Hertroys 2005-05-11 16:16:19 Re: Disabling Triggers