Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A27E99F976A for ; Tue, 21 Aug 2007 19:01:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 07555-02 for ; Tue, 21 Aug 2007 19:01:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.189]) by postgresql.org (Postfix) with ESMTP id 1863F9F959B for ; Tue, 21 Aug 2007 19:01:24 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id l15so1264731rvb for ; Tue, 21 Aug 2007 15:01:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iWK68GC1yN9rOm1iCWtgJcnUDKfjtK/JJzAoPMlLCdsU3LK1NWQQKxHCwBwC/hsO+5ho20pWt+EGVkShOkF6CarQ03laAJo9cegX6WeJummUd58bklSyRarI2cMESoUH7IpPPNF2A/NBOdl3IBkHqzHEvfwixNScjd6CbLIq+B0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CZ8Dxwo5yFyyYmkZIhqf0Lq3cKNTUc2qBaWZKuabFQ4RUe0RZ3m7wEIoJ2+IJih8v4P6pPUCNbSG078Z+APODd1VqB2Ad2HcsELhN7CV2qJ50QiNKb7PZlqS/5C2PS8nJpS/EFdYOeJfCwUCdFB4qVbc5cE9wSGK3+eNfUtTbvU= Received: by 10.141.15.19 with SMTP id s19mr3685954rvi.1187733683707; Tue, 21 Aug 2007 15:01:23 -0700 (PDT) Received: by 10.141.98.12 with HTTP; Tue, 21 Aug 2007 15:01:23 -0700 (PDT) Message-ID: Date: Tue, 21 Aug 2007 17:01:23 -0500 From: "Scott Marlowe" To: "Sachchida Ojha" Subject: Re: Autovacuum is running forever Cc: "Michael Glaesemann" , pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/221 X-Sequence-Number: 26351 On 8/21/07, Sachchida Ojha wrote: > vacuum_cost_delay = 200 > vacuum_cost_page_hit = 1 > vacuum_cost_page_miss = 10 > vacuum_cost_page_dirty = 20 > vacuum_cost_limit = 200 > > autovacuum = on > autovacuum_naptime = 3600 > > maintenance_work_mem = 256MB # min 1024, size That's a REALLY long naptime. Better to let autovacuum decide if you need vacuum more often, and just increase the vacuum_cost_delay and decrease vacuum_cost_limit so that vacuum doesn't slam your I/O. Maintenance work mem on the other hand is plenty big. and your fsm settings seem large enough to handle your freed space. But making vacuum wait so long between runs may be slowly bloating your data store, and then vacuum becomes more and more expensive because it takes longer and longer to run.