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 ADE65D1B561 for ; Wed, 22 Oct 2003 17:03:33 +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 38955-10 for ; Wed, 22 Oct 2003 14:03:03 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 2ED3AD1B4EF for ; Wed, 22 Oct 2003 14:03:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9MH2vit017146; Wed, 22 Oct 2003 13:02:57 -0400 (EDT) To: Josh Berkus Cc: Simon Sadedin , pgsql-performance@postgresql.org Subject: Re: poor cpu utilization on dual cpu box In-reply-to: <200310220911.14853.josh@agliodbs.com> References: <20031022145757.80993.qmail@web12603.mail.yahoo.com> <200310220911.14853.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Wed, 22 Oct 2003 09:11:14 -0700" Date: Wed, 22 Oct 2003 13:02:56 -0400 Message-ID: <17145.1066842176@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/581 X-Sequence-Number: 4329 Josh Berkus writes: >> We are running with shared buffers large enough to hold the >> entire database > Which is bad. This is not what shared buffers are for. See: > http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html In fact, that may be the cause of the performance issue. The high context-swap rate suggests heavy contention for shared-memory data structures. The first explanation that occurs to me is that too much time is being spent managing the buffer hashtable, causing that to become a serialization bottleneck. Try setting shared_buffers to 10000 or so and see if it gets better. regards, tom lane