Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A61699FA0CC for ; Wed, 15 Nov 2006 05:08:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 51464-08 for ; Wed, 15 Nov 2006 09:07:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id CD8859FA1E2 for ; Wed, 15 Nov 2006 05:07:53 -0400 (AST) thread-index: AccIlYmD7AObEXOcTq6R/Y9of4nmUA== Received: from [192.168.0.31] ([84.12.80.212]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 15 Nov 2006 04:07:54 -0500 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 Content-class: urn:content-classes:message Importance: normal Subject: Re: Context switch storm From: "Simon Riggs" To: "Merlin Moncure" Cc: "Cosimo Streppone" , "Richard Huxton" , "Postgresql Performance list" In-Reply-To: References: <454B3B75.6@archonet.com> <454B3EDC.3090502@streppone.it> <454B4438.9080105@archonet.com> <455991B0.6070209@streppone.it> Content-Type: text/plain; charset="iso-8859-1" Date: Wed, 15 Nov 2006 09:07:16 +0000 Message-ID: <1163581636.27956.141.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Nov 2006 09:07:55.0078 (UTC) FILETIME=[89588E60:01C70895] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/106 X-Sequence-Number: 21876 On Tue, 2006-11-14 at 09:17 -0500, Merlin Moncure wrote: > On 11/14/06, Cosimo Streppone wrote: > > I must say I lowered "shared_buffers" to 8192, as it was before. > > I tried raising it to 16384, but I can't seem to find a relationship > > between shared_buffers and performance level for this server. > > My findings are pretty much the same here. I don't see any link > between shared buffers and performance. I'm still looking for hard > evidence to rebut this point. Lower shared buffers leaves more > memory for what really matters, which is sorting. In 8.0 there is a performance issue such that bgwriter will cause a performance problem with large shared_buffers setting. That in itself could lead to some fairly poor measurements of the value of shared_buffers. In 7.4 and prior releases setting shared_buffers higher was counter productive in many ways, so isn't highly recommended. In general, setting shared_buffers higher works for some workloads and doesn't for others. So any measurements anybody makes depend upon the workload and the size of the database. The more uniformly/randomly you access a large database, the more benefit you'll see from large shared_buffers. 8.1 benefits from having a higher shared_buffers in some cases because it reduces contention on the buffer lwlocks; 8.2 solves this issue. Even in 8.2 ISTM that a higher shared_buffers setting wastes memory with many connected users since the PrivRefCount array uses memory that could have been used as filesystem cache. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com