Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 7EF5B2E2D65 for ; Fri, 18 Jan 2008 08:41:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 91658-03-2 for ; Fri, 18 Jan 2008 08:41:29 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id EB7762E0070 for ; Fri, 18 Jan 2008 08:41:35 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-113-152.bk8-dsl.surnet.cl [200.126.113.152]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m0ICfblJ012416 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jan 2008 04:41:40 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9804447BC7; Fri, 18 Jan 2008 09:41:21 -0300 (CLST) Date: Fri, 18 Jan 2008 09:41:21 -0300 From: Alvaro Herrera To: Adrian Moisey Cc: pgsql-performance@postgresql.org Subject: Re: strange pauses Message-ID: <20080118124121.GA5326@alvh.no-ip.org> References: <478DDF83.8070106@careerjunction.co.za> <478DE16F.50308@archonet.com> <4790863E.4000309@careerjunction.co.za> <47909577.4070704@careerjunction.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47909577.4070704@careerjunction.co.za> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Fri, 18 Jan 2008 04:41:40 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/145 X-Sequence-Number: 28384 Adrian Moisey wrote: > Hi > >>>> If I tail the logs, I see a steady stream of functions that took longer >>>> then 5 seconds. But every now and then I see nothing for 3 minutes and >>>> after that a whole bunch (about 20 - 30) queries all finishing at the >>>> same second. >>> >>> Search this list for references to "checkpoints". If you run >>> vmstat/iostat for a bit you should see bursts of disk activity at those >>> times. >>> >>> Counter-intuitively you probably want *more* checkpoints (with less data >>> to write out each time), but see the list archives for discussion. Also >>> check the manuals for some background info. >> >> We use a lot of checkpoints in our database, we don't care about these > > We use a lot of temporary tables in our database, sorry. > >> much. We think this is causing the checkpoint to write a lot of data at >> checkpoint time. Can we stop this behavior ? No, data written in temp tables do not cause extra I/O on checkpoint. Catalog changes due to temp table creation could, but I doubt that's the problem. Perhaps, if you want to avoid I/O caused by temp tables (but it's not at checkpoint time, so perhaps this has nothing to do with your problem), you could try raising temp_buffers. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support