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 83028D1DD99 for ; Thu, 22 Apr 2004 03:03:49 -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 94654-05 for ; Thu, 22 Apr 2004 03:03:43 -0300 (ADT) Received: from www.postgresql.com (www.postgresql.com [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id 4FD2BD1EAAC for ; Thu, 22 Apr 2004 03:01:56 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by www.postgresql.com (Postfix) with ESMTP id 98C40CF64A0 for ; Thu, 22 Apr 2004 00:10:44 -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 i3M3Ah8A018621; Wed, 21 Apr 2004 23:10:43 -0400 (EDT) To: Paul Tuckfield Cc: pgsql-performance@postgresql.org Subject: Re: Wierd context-switching issue on Xeon In-reply-to: <9D274446-932B-11D8-BA67-000393BD6C3E@tuckfield.com> References: <40843E63.7050101@joeconway.com> <200404191455.04068.josh@agliodbs.com> <1407.1082419316@sss.pgh.pa.us> <1931.1082422389@sss.pgh.pa.us> <9D274446-932B-11D8-BA67-000393BD6C3E@tuckfield.com> Comments: In-reply-to Paul Tuckfield message dated "Tue, 20 Apr 2004 17:34:13 -0700" Date: Wed, 21 Apr 2004 23:10:43 -0400 Message-ID: <18620.1082603443@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/374 X-Sequence-Number: 6674 Paul Tuckfield writes: >> I used the taskset command: >> taskset 01 -p >> taskset 01 -p >> >> I guess that 0 and 1 are the two cores (pipelines? hyper-threads?) on >> the first Xeon processor in the box. AFAICT, what you've actually done here is to bind both backends to the first logical processor of the first Xeon. If you'd used 01 and 02 as the affinity masks then you'd have bound them to the two cores of that Xeon, but what you actually did simply reduces the system to a uniprocessor. In that situation the context swap rate will be normally one swap per scheduler timeslice, and at worst two swaps per timeslice (if a process is swapped away from while it holds a lock the other one wants). It doesn't prove a lot about our SMP problem though. I don't have access to a Xeon with both taskset and hyperthreading enabled, so I can't check what happens when you do the taskset correctly ... could you retry? regards, tom lane