X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 85FFD11F61F4 for ; Fri, 7 Apr 2006 19:52:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90511-06 for ; Fri, 7 Apr 2006 19:52:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CD11111F6109 for ; Fri, 7 Apr 2006 19:52:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k37MqKIn017516; Fri, 7 Apr 2006 18:52:20 -0400 (EDT) To: Gavin Hamill cc: pgsql-performance@postgresql.org Subject: Re: pg 8.1.3, AIX, huge box, painfully slow. In-reply-to: <20060407232759.45581362.gdh@laterooms.com> References: <20060407185823.abe93017.gdh@laterooms.com> <1144436060.32269.13.camel@state.g2switchworks.com> <20060407205919.a091da26.gdh@laterooms.com> <15772.1144440362@sss.pgh.pa.us> <20060407223635.9c4a0b38.gdh@laterooms.com> <17055.1144447009@sss.pgh.pa.us> <20060407232759.45581362.gdh@laterooms.com> Comments: In-reply-to Gavin Hamill message dated "Fri, 07 Apr 2006 23:27:59 +0100" Date: Fri, 07 Apr 2006 18:52:20 -0400 Message-ID: <17515.1144450340@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.129 required=5 tests=[AWL=0.129] X-Spam-Score: 0.129 X-Spam-Level: X-Archive-Number: 200604/165 X-Sequence-Number: 18249 Gavin Hamill writes: > On Fri, 07 Apr 2006 17:56:49 -0400 > Tom Lane wrote: >> This is not good. Did the semop storms coincide with visible >> slowdown? (I'd assume so, but you didn't actually say...) > Yes, there's a definate correlation here.. I attached truss to the > main postmaster.. > ... > And when I saw a flood of semop's for any particular PID, a second later > in the 'topas' process list would show that PID at a 100% CPU ... So apparently we've still got a problem with multiprocess contention for an LWLock somewhere. It's not the BufMgrLock because that's gone in 8.1. It could be one of the finer-grain locks that are still there, or it could be someplace else. Are you in a position to try your workload using PG CVS tip? There's a nontrivial possibility that we've already fixed this --- a couple months ago I did some work to reduce contention in the lock manager: 2005-12-11 16:02 tgl * src/: backend/access/transam/twophase.c, backend/storage/ipc/procarray.c, backend/storage/lmgr/README, backend/storage/lmgr/deadlock.c, backend/storage/lmgr/lock.c, backend/storage/lmgr/lwlock.c, backend/storage/lmgr/proc.c, include/storage/lock.h, include/storage/lwlock.h, include/storage/proc.h: Divide the lock manager's shared state into 'partitions', so as to reduce contention for the former single LockMgrLock. Per my recent proposal. I set it up for 16 partitions, but on a pgbench test this gives only a marginal further improvement over 4 partitions --- we need to test more scenarios to choose the number of partitions. This is unfortunately not going to help you as far as getting that machine into production now (unless you're brave enough to run CVS tip as production, which I certainly am not). I'm afraid you're most likely going to have to ship that pSeries back at the end of the month, but while you've got it it'd be awfully nice if we could use it as a testbed ... regards, tom lane