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 6CF8CD1DB23 for ; Wed, 21 Apr 2004 22:45:54 -0300 (ADT) 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 26062-08 for ; Wed, 21 Apr 2004 22:45:55 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6AE10D1DA3C for ; Wed, 21 Apr 2004 22:45:51 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3M1js0j017857; Wed, 21 Apr 2004 21:45:54 -0400 (EDT) To: Kenneth Marshall Cc: pgsql-performance@postgresql.org Subject: Re: Wierd context-switching issue on Xeon In-reply-to: <20040421220231.GA18010@it.is.rice.edu> References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF78509814A@vt-pe2550-001.vantage.vantage.com> <200404200959.52813.josh@agliodbs.com> <1082515263.1558.214.camel@localhost.localdomain> <78427208-93C0-11D8-BA67-000393BD6C3E@tuckfield.com> <14264.1082573491@sss.pgh.pa.us> <20040421220231.GA18010@it.is.rice.edu> Comments: In-reply-to Kenneth Marshall message dated "Wed, 21 Apr 2004 17:02:31 -0500" Date: Wed, 21 Apr 2004 21:45:54 -0400 Message-ID: <17856.1082598354@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/366 X-Sequence-Number: 6666 Kenneth Marshall writes: > If the context swap storm derives from LWLock contention, maybe using > a random order to assign buffer locks in buf_init.c would prevent > simple adjacency of buffer allocation to cause the storm. Good try, but no cigar ;-). The test cases I've been looking at take only shared locks on the per-buffer locks, so that's not where the context swaps are coming from. The swaps have to be caused by the BufMgrLock, because that's the only exclusive lock being taken. I did try increasing the allocated size of the spinlocks to 128 bytes to see if it would do anything. It didn't ... regards, tom lane