Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id D2E659FB227 for ; Tue, 14 Nov 2006 17:43:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 23385-05 for ; Tue, 14 Nov 2006 17:43:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp6.libero.it (smtp6.libero.it [193.70.192.59]) by postgresql.org (Postfix) with ESMTP id 7795B9FB25A for ; Tue, 14 Nov 2006 17:43:44 -0400 (AST) Received: from localhost (172.16.1.15) by smtp6.libero.it (7.0.027-DD01) id 453F690001E7C8AC; Tue, 14 Nov 2006 22:43:24 +0100 Received: from smtp1.libero.it ([172.16.1.224]) by localhost (asav11.libero.it [193.70.192.93]) (amavisd-new, port 10024) with ESMTP id 15421-05-11; Tue, 14 Nov 2006 22:43:23 +0100 (CET) Received: from [151.25.109.35] (ppp-35-109.25-151.libero.it [151.25.109.35]) by smtp1.libero.it (Postfix) with ESMTP id CADCEA8C38; Tue, 14 Nov 2006 22:43:20 +0100 (MET) Message-ID: <455A3878.20702@streppone.it> Date: Tue, 14 Nov 2006 22:43:20 +0100 From: Cosimo Streppone User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: it, it-it, en-us, en MIME-Version: 1.0 To: Merlin Moncure CC: Postgresql Performance list , Jim Nasby , Richard Huxton Subject: Re: Context switch storm References: <454B3B75.6@archonet.com> <454B3EDC.3090502@streppone.it> <454B4438.9080105@archonet.com> <455991B0.6070209@streppone.it> <20061114165022.GS90133@nasby.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned: with antispam and antivirus automated system at libero.it X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/105 X-Sequence-Number: 21875 Merlin wrote: > On 11/14/06, Jim C. Nasby wrote: > >> On Tue, Nov 14, 2006 at 09:17:08AM -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. >> > [...] >> >> BTW, shared_buffers of 16384 is pretty low by today's standards > > Can you think of a good way to construct a test case that would > demonstrate the difference? Not sure of actual relevance, but some time ago I performed (with 8.0) several pg_bench tests with 1,5,10,20 concurrent clients with same pg configuration except one parameter for every run. In one of these tests I run pgbench with shared_buffers starting at 1024 and doubling it to 2048, ..., until 16384. I found the best performance in terms of transactions per second around 4096/8192. That said, I don't know if pgbench stresses the database like my typical oltp application does. And also, I suspect that shared_buffers should not be evaluated as an absolute number, but rather as a number relative to maximum main memory (say 1/2 the total ram, 1/3, 2/3, ...). -- Cosimo