Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8BA222E4309 for ; Thu, 20 Dec 2007 18:13:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 10538-05 for ; Thu, 20 Dec 2007 18:13:30 -0400 (AST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.225]) by postgresql.org (Postfix) with ESMTP id A25782E42D6 for ; Thu, 20 Dec 2007 18:13:29 -0400 (AST) Received: by nz-out-0506.google.com with SMTP id l8so41634nzf.28 for ; Thu, 20 Dec 2007 14:13:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=XA5bXn4iGDXEkNv/YfGWMPf90zPlUtaNB6WRga5+2yQ=; b=S7OiAQGR4absQctU61mQ5GcilmprV1j7H/jTOCLr4XR7UMpkGj8P8ezfjAo3F9o6gHnEXDvDmTGYxIFj4/pYu1HtC6XlnOJCG/53AW9V3p3Bsv2qCCkAh3BRlNW8egR0GXe5e6CeiZQBVM7Qdgnwmod9/l5dDHfyCL5YEce8d7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UWGtCOUbgS8Sc1wsortUjmmN5jJ/5+Ge3hoGFaxz20wdC7gy0iGZ8Cny2trxAt9cvV55Txwon1TYl0MjL2397G/DoLIhQubUOsL9MXlV3xdAulwow7a5HEjLmf3HnN5u/Hp9pbHd2DEko3IKMTruI8/68fceV89kxgRY7VwwlI8= Received: by 10.142.155.4 with SMTP id c4mr405728wfe.208.1198188808064; Thu, 20 Dec 2007 14:13:28 -0800 (PST) Received: by 10.142.143.6 with HTTP; Thu, 20 Dec 2007 14:13:28 -0800 (PST) Message-ID: Date: Thu, 20 Dec 2007 16:13:28 -0600 From: "Scott Marlowe" To: ivan.hou Subject: Re: about the performance of autovacuum and vacuumdb? Cc: pgsql-admin@postgresql.org In-Reply-To: <14431704.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <14431704.post@talk.nabble.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/199 X-Sequence-Number: 27716 On Dec 20, 2007 12:50 AM, ivan.hou wrote: > > i try to compare two methods of garbage-collect.(Postgresql Ver:8.1.3) > > 1. enable autovacuum without using vacuumdb -f mydb in crontab. > 2. using crontab to vacuumdb in every 10 min (autovacuum disable) > > the method 2 got more free space than method 1. > > the disk size of database still increased in method 1. > so, what's the advantage of autovacuum? That really depends. Did the db size increase at first under method 1, then reach a steady state, or did it just keep bloating. It might well be that vacuuming every 10 minutes cost you more in terms of performance than would using autovacuum, and the trade off was slightly more disk space used. Or it could be the db was bloating. If the db was bloating, as Alvaro mentioned, you likely don't have aggressive enough settings for autovacuum. Also, update your pg install to the latest 8.1.x version, 8.1.3 has quite a few nasty bugs in it.