Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 272999FB7A1 for ; Fri, 18 May 2007 16:21:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 14238-08 for ; Fri, 18 May 2007 16:21:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 70A449FB774 for ; Fri, 18 May 2007 16:21:42 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 3F93830AF7; Fri, 18 May 2007 21:21:41 +0200 (MET DST) From: Ron Mayer X-Newsgroups: pgsql.performance Subject: Re: Background vacuum Date: Fri, 18 May 2007 12:21:39 -0700 Organization: Hub.Org Networking Services Lines: 43 Message-ID: <464DFCC3.8040207@cheapcomplexdevices.com> References: <4642A1B3.6030009@swissembedded.com> <4642A811.9010703@drivefaster.net> <4643B490.2040704@cheapcomplexdevices.com> <20070517135530.GI6907@phlogiston.dyndns.org> <464D04F8.7020306@cheapcomplexdevices.com> <464D18CE.8070408@cheapcomplexdevices.com> <18134.1179458524@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Tom Lane User-Agent: Icedove 1.5.0.10 (X11/20070329) In-Reply-To: <18134.1179458524@sss.pgh.pa.us> To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/339 X-Sequence-Number: 24729 Tom Lane wrote: > Ron Mayer writes: >> Greg Smith wrote: >>> Count me on the side that agrees adjusting the vacuuming parameters is >>> the more straightforward way to cope with this problem. > >> Agreed for vacuum; but it still seems interesting to me that >> across databases and workloads high priority transactions >> tended to get through faster than low priority ones. Is there >> any reason to believe that the drawbacks of priority inversion >> outweigh the benefits of setting priorities? > > Well, it's unclear, and anecdotal evidence is unlikely to convince > anybody. I had put some stock in the CMU paper, but if it's based > on PG 7.3 then you've got to **seriously** question its relevance > to the current code. I was thinking the paper's results might apply more generally to RDBMS-like applications since they did test 3 of them with different locking behavior and different bottlenecks. But true, I should stop bringing up 7.3 examples. Anecdotally ;-) I've found renice-ing reports to help; especially in the (probably not too uncommon case) where slow running batch reporting queries hit different tables than interactive reporting queries. I guess that's why I keep defending priorities as a useful technique. It seems even more useful considering the existence of schedulers that have priority inheritance features. I'll admit there's still the theoretical possibility that it's a foot-gun so I don't mind people having to write their own stored procedure to enable it - but I'd be surprised if anyone could find a real world case where priorities would do more harm than good. Though, yeah, it'd be easy to construct an artificial case that'd demonstrate priority inversion (i.e. have a low priority process that takes a lock and sits and spins on some CPU-intensive stored procedure without doing any I/O).