Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E6A062E0291 for ; Thu, 29 Nov 2007 12:14:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 46304-06 for ; Thu, 29 Nov 2007 12:14:10 -0400 (AST) Received: from outmail136032.authsmtp.com (outmail136032.authsmtp.com [62.13.136.32]) by postgresql.org (Postfix) with ESMTP id E01B42E0047 for ; Thu, 29 Nov 2007 12:14:09 -0400 (AST) Received: from outmail128183.authsmtp.com (outmail128183.authsmtp.com [62.13.128.183]) by punt3.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id lATGE5rA032128; Thu, 29 Nov 2007 16:14:05 GMT Received: from [192.168.0.3] (85-211-24-246.dyn.gotadsl.co.uk [85.211.24.246]) (authenticated bits=0) by mail.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id lATGE2sc007088; Thu, 29 Nov 2007 16:14:04 GMT Subject: Re: 7.4 Checkpoint Question From: Simon Riggs To: Brad Nicholson Cc: pgsql-performance@postgresql.org In-Reply-To: <1196349054.5651.19.camel@bnicholson-desktop> References: <1196349054.5651.19.camel@bnicholson-desktop> Content-Type: text/plain Date: Thu, 29 Nov 2007 16:14:21 +0000 Message-Id: <1196352861.4246.1302.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Server-Quench: 1ac40a43-9e96-11dc-814e-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFagxbY1ZH HGQLW1NEUVt7WGd/ aw4fZQBDYEtPQQdu TkpNRE1QERpoT0Bw YmlrUFohdwVBeHZ4 K0dqXnQVXRUpcUYs Rk1JHDgPY3phaTRM TUhZc1ZJcANLfxdA PlN4UyBcLwdSbGoL JyIJERcLGAAXd2IJ CioNIFkRWUEKGCJ0 fg0PBikuGktt X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:787/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/375 X-Sequence-Number: 27790 On Thu, 2007-11-29 at 10:10 -0500, Brad Nicholson wrote: > I have a legacy system still on 7.4 (I know, I know...the upgrade is > coming soon). > > I have a fairly big spike happening once a day, every day, at the same > time. It happens during a checkpoint, no surprise there. I know the > solution to the problem (upgrade to a modern version), but what I'm > looking for as an explanation as to why one particular checkpoint would > be so bad on a low volume system, so I can appease certain management > concerns. > > This is a _really _low volume system, less than 500 writes/hour. Normal > operation sees checkpoint related spikes of around 200-300 milliseconds. > We always checkpoint at the checkpoint timeout (every 5 minutes). > During this one checkpoint, I'm seeing transactions running 2-3 seconds. > During this time, writes are < 5/minute. > > Relevant settings: > shared_buffers = 10000 > > checkpoint_segments = 30 > checkpoint_timeout = 300 > > What gives? If the timing is regular, its most likely a human-initiated action rather then a behavioural characteristic. VACUUM runs in background at that time, updates loads of blocks which need to be written out at checkpoint time. That slows queries down at that time but not others. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com