Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 90F8B9FC095 for ; Thu, 17 May 2007 23:50:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 36663-01-10 for ; Thu, 17 May 2007 23:50:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id A4B689FB70B for ; Thu, 17 May 2007 23:50:46 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id l4I2omkr026241 for ; Thu, 17 May 2007 22:50:48 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id l4I2omG4026238 for ; Thu, 17 May 2007 22:50:48 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Thu, 17 May 2007 22:50:48 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: pgsql-performance@postgresql.org Subject: Re: Background vacuum In-Reply-To: <464D04F8.7020306@cheapcomplexdevices.com> Message-ID: References: <4642A1B3.6030009@swissembedded.com> <4642A811.9010703@drivefaster.net> <4643B490.2040704@cheapcomplexdevices.com> <20070517135530.GI6907@phlogiston.dyndns.org> <464D04F8.7020306@cheapcomplexdevices.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/308 X-Sequence-Number: 24698 Ah, glad this came up again 'cause a problem here caused my original reply to bounce. On Thu, 10 May 2007, Ron Mayer wrote: > Actually, CPU priorities _are_ an effective way of indirectly scheduling > I/O priorities. This paper studied both CPU and lock priorities on a > variety of databases including PostgreSQL. > http://www.cs.cmu.edu/~bianca/icde04.pdf I spent a fair amount of time analyzing that paper recently, and found it hard to draw any strong current conclusions from it. Locking and related scalability issues are much better now than in the PG 7.3 they tested. For example, from the paper: "We find almost all lightweight locking in PostgreSQL fucntions to serialize the I/O buffer pool and WAL activity...as a result, we attribute all the lightweight lock waiting time for the above-listed locks to I/O." Well, sure, if you classify those as I/O waits it's no surprise you can darn near directly control them via CPU scheduling; I question the current relevancy of this historical observation about the old code. I think it's much easier to get into an honest I/O bound situation now with a TPC-C like workload (they kind of cheated on that part too which is a whole 'nother discussion), especially with the even faster speeds of modern processors, and then you're in a situation where CPU scheduling is not so effective for indirectly controlling I/O prioritization. Count me on the side that agrees adjusting the vacuuming parameters is the more straightforward way to cope with this problem. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD