Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8404CFA6B9C for ; Thu, 22 Mar 2012 09:52:57 -0300 (ADT) Received: from elizabeth.gransy.com ([89.187.132.199]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SAhVg-0004ny-Bp for pgsql-performance@postgresql.org; Thu, 22 Mar 2012 12:52:57 +0000 Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id A630015E414E; Thu, 22 Mar 2012 13:52:39 +0100 (CET) Received: from 193.179.187.70 (proxying for unknown) (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Thu, 22 Mar 2012 13:52:39 +0100 Message-ID: <6fa153b454f30dd989039af7695d9fe7.squirrel@sq.gransy.com> In-Reply-To: <00bd01cd0828$accc8110$06658330$@com> References: <006301cd07fd$358ebe40$a0ac3ac0$@com> <4F6AF3FE.30407@gmail.com> <008e01cd0817$06418680$12c49380$@com> <1bbfac04d1ec4a2708e47593dc84ba8c.squirrel@sq.gransy.com> <00b601cd0824$c8dfd6d0$5a9f8470$@com> <00bd01cd0828$accc8110$06658330$@com> Date: Thu, 22 Mar 2012 13:52:39 +0100 Subject: Re: Write workload is causing severe slowdown in Production From: "Tomas Vondra" To: gnanam@zoniac.com Cc: "'Tomas Vondra'" , "'Vitalii Tymchyshyn'" , pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/146 X-Sequence-Number: 46596 On 22 B=C5=99ezen 2012, 13:38, Gnanakumar wrote: >> There's a checkpoint_warning option. Set it to 3600 and you should get >> messages in the log. > > I've a basic question about setting "checkpoint_warning" configuration. > 8.2 doc > (http://www.postgresql.org/docs/8.2/interactive/runtime-config-wal.html= ) > says: > > "Write a message to the server log if checkpoints caused by the filling= of > checkpoint segment files happen closer together than this many seconds > (which suggests that checkpoint_segments ought to be raised). The defau= lt > is 30 seconds (30s)." > > How does increasing the default 30s to 3600s (which is 1 hour or 60 > minutes) print messages to the log? Even after reading the description > from above doc, am not able to get this point clearly. Can you help me= in > understanding this? A checkpoint may be triggered for two main reasons: (1) all available WAL segments are filled (you do have 32 of them, i.e. 512MB of WAL data) (2) the checkpoint_timeout runs out (by default 5 mins IIRC) The checkpoint_warning should emmit a 'warning' message whenever the checkpoint happens less than the specified number of seconds since the last one, so setting it high enough should log all checkpoints. The fact that this does not happen (no warning messages) suggests this is not caused by checkpoints. It may be caused by the database, but it seems unlikely it's checkpoints. Tomas