Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 459CD9FA338 for ; Mon, 23 Oct 2006 19:39:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 49143-02 for ; Mon, 23 Oct 2006 22:39:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from outbound.mailhop.org (outbound.mailhop.org [63.208.196.171]) by postgresql.org (Postfix) with ESMTP id 6FEE59FB1C6 for ; Mon, 23 Oct 2006 19:39:33 -0300 (ADT) Received: from ool-435121e8.dyn.optonline.net ([67.81.33.232] helo=[192.168.0.96]) by outbound.mailhop.org with esmtpa (Exim 4.51) id 1Gc8S6-000DG9-Vb; Mon, 23 Oct 2006 18:39:27 -0400 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 67.81.33.232 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: tocr Message-ID: <453D449B.50404@zeut.net> Date: Mon, 23 Oct 2006 18:39:23 -0400 From: Matthew O'Connor User-Agent: Thunderbird 2.0a1 (Windows/20060724) MIME-Version: 1.0 To: Tom Lane CC: "Jim C. Nasby" , Hitoshi Harada , 'Peter Eisentraut' , pgsql-hackers@postgresql.org Subject: Re: [PATCHES] smartvacuum() instead of autovacuum References: <10306.1161569392@sss.pgh.pa.us> <200610230220.k9N2KUeZ051790@mbox31.po.2iij.net> <20061023183628.GR26892@nasby.net> <27345.1161630483@sss.pgh.pa.us> In-Reply-To: <27345.1161630483@sss.pgh.pa.us> 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: 200610/1249 X-Sequence-Number: 93146 Tom Lane wrote: > "Jim C. Nasby" writes: >> The only case I can think of where autovac might not work as well as >> smartvacuum would be if you had a lot of databases in the cluster, since >> autovacuum will only vacuum one database at a time. > > It's conceivable that it'd make sense to allow multiple autovac > processes running in parallel. (The infrastructure part of this is easy > enough, the hard part is keeping them from all deciding to vacuum the > same table.) > > One reason we have not done that already is the thought that multiple > vacuum processes would suck too much I/O to be reasonable. Now you > could dial back their resource demands with the cost-delay settings, > but it's not clear that ten autovacs running at one-tenth speed are > better than one autovac using all the cycles you can spare. Usually > I think it's best if a vacuum transaction finishes as fast as it can. I think this is one of the reasons table specific delay settings were designed in from the beginning. I think the main use cases for multiple vacuums at once are: 1) Vacuum per table space assuming each table space is on a different drive with it's own I/O. 2) the frequently updated table that can't wait to be vacuumed while a large table is being vacuumed. In this case if you set a system default delay setting and set a more aggressive table specific delay setting for your hot spot tables then multiple vacuums become a clear win. This is an important case that I hope we handle soon. At this point it's one of the main failings of the current autovacuum system.