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 D8CBFD1D085 for ; Thu, 15 Apr 2004 16:38:01 -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 77321-07 for ; Thu, 15 Apr 2004 16:38:05 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 24945D1D06D for ; Thu, 15 Apr 2004 16:37:59 -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 i3FJbL3C020499; Thu, 15 Apr 2004 15:37:21 -0400 (EDT) To: Joe Conway Cc: =?ISO-8859-1?Q?Dirk_Lutzeb=E4ck?= , pgsql-performance@postgresql.org Subject: Re: Toooo many context switches (maybe SLES8?) In-reply-to: <407EBA89.6080007@joeconway.com> References: <407E7B99.3050306@aeccom.com> <407EB1E5.4030600@joeconway.com> <407EB86B.6080801@aeccom.com> <407EBA89.6080007@joeconway.com> Comments: In-reply-to Joe Conway message dated "Thu, 15 Apr 2004 09:38:33 -0700" Date: Thu, 15 Apr 2004 15:37:21 -0400 Message-ID: <20498.1082057841@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/189 X-Sequence-Number: 6489 Joe Conway writes: >> Improve spinlock code for recent x86 processors: insert a PAUSE >> instruction in the s_lock() wait loop, and use test before test-and-set >> in TAS() macro to avoid unnecessary bus traffic. Patch from Manfred >> Spraul, reworked a bit by Tom. > I thought this had been committed to the 7.4 stable branch as well, but > it appears not. I am currently chasing what seems to be the same issue: massive context swapping on a dual Xeon system. I tried back-patching the above-mentioned patch ... it helps a little but by no means solves the problem ... regards, tom lane