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 6A1F152809 for ; Wed, 6 Jul 2005 11:15:45 -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 89436-06 for ; Wed, 6 Jul 2005 14:15:34 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id E8B2B5280B for ; Wed, 6 Jul 2005 11:15:32 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j66EFXjV025887; Wed, 6 Jul 2005 10:15:33 -0400 (EDT) To: Alexander Stanier Cc: pgsql-performance@postgresql.org Subject: Re: Heavy virtual memory usage on production system In-reply-to: <42CBC8A0.4070901@egsgroup.com> References: <42CAB1B6.50201@egsgroup.com> <23889.1120582516@sss.pgh.pa.us> <42CBC8A0.4070901@egsgroup.com> Comments: In-reply-to Alexander Stanier message dated "Wed, 06 Jul 2005 13:03:44 +0100" Date: Wed, 06 Jul 2005 10:15:33 -0400 Message-ID: <25886.1120659333@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/44 X-Sequence-Number: 13285 Alexander Stanier writes: > The problem happened again this morning and I took the chance to check > out the locking situation. The number of locks increased dramatically up > to over 1000, but they were all "AccessShareLocks" and all were granted. > The odd "RowExclusiveLock" appeared but none persisted. On the basis > that nothing seems to be waiting for a lock, I don't think it is a > locking problem. Hmm. How many active processes were there, and how many locks per process? (A quick "SELECT pid, count(*) GROUP BY pid" query should give you this info next time.) We just recently got rid of some O(N^2) behavior in the lock manager for cases where a single backend holds many different locks. So if there's a single query acquiring a whole lot of locks, that could possibly have something to do with this. regards, tom lane