X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AA6A132A07F for ; Wed, 6 Oct 2004 08:44:23 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01996-02 for ; Wed, 6 Oct 2004 07:44:12 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id E1D6B32A3F6 for ; Wed, 6 Oct 2004 08:44:13 +0100 (BST) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1CF6Sw-0004sI-00; Wed, 06 Oct 2004 03:44:02 -0400 To: Alan Stange Cc: josh@agliodbs.com, pgsql-performance@postgresql.org Subject: Re: Excessive context switching on SMP Xeons References: <4162CA14.6080206@lulu.com> <200410050947.36174.josh@agliodbs.com> <41630D50.3020308@lulu.com> <200410051538.51664.josh@agliodbs.com> <41636D8E.1090403@rentec.com> In-Reply-To: <41636D8E.1090403@rentec.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 06 Oct 2004 03:44:02 -0400 Message-ID: <87acv0z3y5.fsf@stark.xeocode.com> Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/53 X-Sequence-Number: 8529 Alan Stange writes: > A few quick random observations on the Xeon v. Opteron comparison: > > - running a dual Xeon with hyperthreading turned on really isn't the same as > having a quad cpu system. I haven't seen postgresql specific benchmarks, but > the general case has been that HT is a benefit in a few particular work > loads but with no benefit in general. Part of the FUD with hyperthreading did have a kernel of truth that lied in older kernels' schedulers. For example with Linux until recently the kernel can easily end up scheduling two processes on the two virtual processors of one single physical processor, leaving the other physical processor totally idle. With modern kernels' schedulers I would expect hyperthreading to live up to its billing of adding 10% to 20% performance. Ie., a dual Xeon machine with hyperthreading won't be as fast as four processors, but it should be 10-20% faster than a dual Xeon without hyperthreading. As with all things that will only help if you're bound by the right limited resource to begin with. If you're I/O bound it isn't going to help. I would expect Postgres with its heavy demand on memory bandwidth and shared memory could potentially benefit more than usual from being able to context switch during pipeline stalls. -- greg