Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 684FA1337BA5 for ; Fri, 11 Feb 2011 18:32:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 15781-10 for ; Fri, 11 Feb 2011 22:32:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id F28651337B7E for ; Fri, 11 Feb 2011 18:32:19 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 11 Feb 2011 16:32:19 -0600 Message-Id: <4D55648A020000250003A8DA@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 11 Feb 2011 16:32:10 -0600 From: "Kevin Grittner" To: "jf" , Subject: Re: increased load on server References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/88 X-Sequence-Number: 36727 jf wrote: > I tried to tune posgresql.conf to use more memory. Right before the problems started? As an attempt to deal with the problems? Years ago? > In two years on production everything was fine, but today > something goes wrong: postgresql processes eat my server > ressources, my load, which was between 0 and 2.5 on my 4 cpus > server, grows to 20. The output from `vmstat 1` during such an episode might be enlightening. > When the trouble appends there was a lot of waiting queries on my > ltree table. Waiting where? Are you talking about executing queries which are blocked trying to acqure locks on the ltree table? > I tried to restart postgresql server and to reboot the server, but > 5 minutes later, the trouble was here again. Any idea what changed during those 5 minutes? > I did a backup/restore of my database (pg_dump -Fc / pg_restore), > and it was fine for 2 hours but after the touble reappears. Did you notice anything about the usage during those two hours? Did you take a close look at what queries were being run when things are OK versus when they are not? > I notice that the "base" directory grows a lot when the trouble > begins. I made a 'vacuum', 'vacuum analyze', 'vacuum full' but the > disk usage isn't lower. Hopefully you are running autovacuum. VACUUM FULL is normally not a good idea in 8.3. What you might want to look for is a lingering transaction which is preventing normal autovacuum from working. Does anything show if you select from pg_prepared_xacts? Are there any rows in pg_stat_activity with a xact_start value older than it should be? One connection sitting in status ' in transaction' for a long time can cause all sorts of problems. If these hints don't point you in the right direction, please review this page for ideas on more information you can supply to help people understand the problem and its cause: http://wiki.postgresql.org/wiki/Guide_to_reporting_problems In particular, knowing your exact PostgreSQL version, the contents of your postgresql.conf file (minus all comments), the number of connections you have active during the problem periods, and (if possible) listings of pg_stat_activity and pg_locks during a problem episode. -Kevin