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 CD23B9DCCB8 for ; Tue, 6 Dec 2005 17:36:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 98821-03 for ; Tue, 6 Dec 2005 17:36:59 -0400 (AST) 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 797C79DCC0B for ; Tue, 6 Dec 2005 17:36:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jB6LarGK016609; Tue, 6 Dec 2005 16:36:54 -0500 (EST) To: "Brandon Metcalf" cc: pgsql-performance@postgresql.org Subject: Re: Context switching and Xeon processors In-reply-to: References: Comments: In-reply-to "Brandon Metcalf" message dated "Tue, 06 Dec 2005 15:01:02 -0600" Date: Tue, 06 Dec 2005 16:36:53 -0500 Message-ID: <16608.1133905013@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.002 required=5 tests=[AWL=0.002] X-Spam-Score: 0.002 X-Spam-Level: X-Archive-Number: 200512/198 X-Sequence-Number: 16019 "Brandon Metcalf" writes: > We've been tuning the kernel (2.4 SMP flavor) and have improved > performance quite a bit. I'm now wondering if turning off HT will > improve performance even more. Based on the vmstat output below, is > the context switching typical or too high? Given that your CPU usage is hovering around 2%, it's highly unlikely that you'll be able to measure any change at all by fiddling with HT. What you need to be working on is disk I/O --- the "80% wait" number is what should be getting your attention, not the CS number. (FWIW, on the sort of hardware you're talking about, I wouldn't worry about CS rates lower than maybe 10000/sec --- the hardware can sustain well over 10x that.) regards, tom lane