X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9CAE752B9E for ; Wed, 13 Jul 2005 15:40:41 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31268-08 for ; Wed, 13 Jul 2005 18:40:37 +0000 (GMT) Received: from mailhost.intellivid.com (mailhost.intellivid.com [64.32.200.11]) by svr1.postgresql.org (Postfix) with ESMTP id 36DCE52B4E for ; Wed, 13 Jul 2005 15:40:36 -0300 (ADT) Received: from [192.168.2.68] (spectre.intellivid.com [192.168.2.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by newmail.intellivid.com (Postfix) with ESMTP id 8595FF1829F; Wed, 13 Jul 2005 14:40:36 -0400 (EDT) Subject: Re: cost-based vacuum From: Ian Westmacott To: Simon Riggs Cc: Tom Lane , pgsql-performance@postgresql.org In-Reply-To: <1121270150.3970.256.camel@localhost.localdomain> References: <1120839902.20657.197.camel@spectre.intellivid.com> <1121081504.3970.53.camel@localhost.localdomain> <1121087266.27427.35.camel@spectre.intellivid.com> <1121093488.3970.70.camel@localhost.localdomain> <1121154338.3970.106.camel@localhost.localdomain> <1121190651.10346.342.camel@spectre.intellivid.com> <1121270150.3970.256.camel@localhost.localdomain> Content-Type: text/plain Organization: Intellivid Corp. Message-Id: <1121280036.13208.8.camel@spectre.intellivid.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 13 Jul 2005 14:40:36 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200507/143 X-Sequence-Number: 13384 On Wed, 2005-07-13 at 11:55, Simon Riggs wrote: > On Tue, 2005-07-12 at 13:50 -0400, Ian Westmacott wrote: > > It appears not to matter whether it is one of the tables > > being written to that is ANALYZEd. I can ANALYZE an old, > > quiescent table, or a system table and see this effect. > > Can you confirm that this effect is still seen even when the ANALYZE > doesn't touch *any* of the tables being accessed? Yes. > > - this is a dual Xeon. > > Is that Xeon MP then? Yes. > > - Looking at oprofile reports for 10-minute runs of a > > database-wide VACUUM with vacuum_cost_delay=0 and 1000, > > shows the latter spending a lot of time in LWLockAcquire > > and LWLockRelease (20% each vs. 2%). > > Is this associated with high context switching also? Yes, it appears that context switches increase up to 4-5x during cost-based ANALYZE. --Ian