Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 843479FB97F for ; Tue, 8 May 2007 01:10:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66821-01 for ; Tue, 8 May 2007 01:10:26 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.228]) by postgresql.org (Postfix) with ESMTP id 4B9E29FB96B for ; Tue, 8 May 2007 01:10:25 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id i28so1564893wxd for ; Mon, 07 May 2007 21:10:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=EW+Lop/fCO8GZMMgS7yMJk2BTdY0c1sIUC9Je8Wc51utQPtMnCfQ9/2hDCw4n+fnOrF4XfcdqFcy6QzjFVek1CXr5VFQ5acAFidiLAg4LJhowt9JGH2MEOWb9CiisbI0LD7QUYoPZQawQa6h59NfdfER+xTjd+lOTATj/oVAlhg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=jezPSUoemPnU8SHjwadb4CsrBrlAp6VBy9BOFEJVDrEC68gs+QJdDCEMkt/d7Dn/8P4XMbBeQxOzxltrJunztjR5UGi/mjJVcDD7IUW6OTNFwWZPJA04Wa3bACgl5D1/ugtqNBBCpKGBp2N0M2ZxrDDrGcOVmPjMJiHI855NT90= Received: by 10.70.39.11 with SMTP id m11mr7127242wxm.1178597424624; Mon, 07 May 2007 21:10:24 -0700 (PDT) Received: from ?192.168.1.10? ( [71.116.121.169]) by mx.google.com with ESMTP id i16sm1050761wxd.2007.05.07.21.10.23; Mon, 07 May 2007 21:10:23 -0700 (PDT) Message-ID: <463FF82F.9040002@gmail.com> Date: Mon, 07 May 2007 21:10:23 -0700 From: Yudhvir Singh Sidhu User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Jim Nasby , pgsql-performance@postgresql.org Subject: Re: How to Find Cause of Long Vacuum Times - NOOB Question References: <463D0BD5.3010404@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/82 X-Sequence-Number: 24472 Jim Nasby wrote: > On May 5, 2007, at 5:57 PM, Yudhvir Singh Sidhu wrote: >> Problem: Vacuum times jump up from 45 minutes, or 1:30 minutes to 6+ >> hours overnight, once every 1 to 3 months. >> Solutions tried: db truncate - brings vacuum times down. Reindexing >> brings vacuum times down. > > Does it jump up to 6+ hours just once and then come back down? Or once > at 6+ hours does it stay there? > > Getting that kind of change in vacuum time sounds a lot like you > suddenly didn't have enough maintenance_work_mem to remember all the > dead tuples in one pass; increasing that setting might bring things > back in line (you can increase it on a per-session basis, too). > > Also, have you considered vacuuming during the day, perhaps via > autovacuum? If you can vacuum more often you'll probably get less > bloat. You'll probably want to experiment with the vacuum_cost_delay > settings to reduce the impact of vacuuming during the day (try setting > vacuum_cost_delay to 20 as a starting point). > -- > Jim Nasby jim@nasby.net > EnterpriseDB http://enterprisedb.com 512.569.9461 (cell) > > > It ramps up and I have to run a db truncate to bring it back down. On some machines it creeps up, on others it spikes. I have seen it climb from 6 to 12 to 21 in 3 consequtive days. Well, what's one to do? I have maintenance_work_mem set to 32768 - Is that enough? I vacuum daily. I just turned vacuum verbose on on one of the systems and will find out tomorrow what it shows me. I plan on playing with Max_fsm_ settings tomorrow. And I'll keep you guys up to date. Yudhvir