X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6562FD1C9BB for ; Sat, 13 Mar 2004 16:52:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 10711-03 for ; Sat, 13 Mar 2004 12:52:12 -0400 (AST) Received: from davinci.ethosmedia.com (server228.ethosmedia.com [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 0E2EAD1C9B5 for ; Sat, 13 Mar 2004 12:52:12 -0400 (AST) Received: from [63.195.55.98] (HELO 192.168.1.29) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 4616793; Sat, 13 Mar 2004 08:53:24 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Joe Conway , Tom Lane Subject: Re: rapid degradation after postmaster restart Date: Sat, 13 Mar 2004 08:51:22 -0800 User-Agent: KMail/1.5.4 Cc: pgsql-performance References: <4052661D.5060505@joeconway.com> <18481.1079192379@sss.pgh.pa.us> <405330CD.4050304@joeconway.com> In-Reply-To: <405330CD.4050304@joeconway.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403130851.22684.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/174 X-Sequence-Number: 6030 Joe, > IIRC, shared buffers was reasonable, maybe 128MB. One thing that is > worthy of note is that they are using pg_autovacuum and a very low > vacuum_mem setting (1024). But I also believe that max_fsm_relations and > max_fsm_pages have been bumped up from default (something like 10000 & > 200000). pg_autovacuum may be your problem. Imagine this: 1) The chain of updates and inserts called by the procedures makes enough changes, on its own, to trigger pg_autovacuum. 2) Because they have a big database, and a low vacuum_mem, a vacuum of the largest table takes noticable time, like several minutes. 3) This means that the vacuum is still running during the second and succeeding events .... Something to check by watching the process list. FWIW, I don't use pg_autovacuum for databases which have frequent large batch updates; I find it results in uneven performance. Feel free to phone me if you're still stuck! -- -Josh Berkus Aglio Database Solutions San Francisco