Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C8AC9B5DBD8 for ; Fri, 27 May 2011 15:26:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 67656-02 for ; Fri, 27 May 2011 18:26:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mail.postgresql.org (Postfix) with ESMTP id 9FED9B5DBC8 for ; Fri, 27 May 2011 15:26:35 -0300 (ADT) Received: from [192.168.1.3] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0McLz9-1Q6QvO1ba3-00JbRp; Fri, 27 May 2011 20:26:34 +0200 Message-ID: <4DDFECD7.7090208@2ndquadrant.com> Date: Fri, 27 May 2011 14:26:31 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Scott Carey CC: Kevin Grittner , Merlin Moncure , postgres performance list Subject: Re: The shared buffers challenge References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:YTIZqVxwe1c7ApTe9uU/LjIb+iyr5GwPDOD9CJeweau aZZ/oqSOfAehhTimW57oa3aXuLMzqyrqb/xyXfOCzCwshZcVEb vEySVSSlD8prfcNr/YDg4XkfXs/1EL8cL1PS4HRhctgb1CXv8y qczWIHLHw/xlI0sArQkUkMLc+IR/vmphvOJhwAvh/mUmGZLBX2 Xn5bYC+cvP8t1/Y9sqprNKpmOZ2NLLkrLYdSEJITCc= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201105/401 X-Sequence-Number: 43910 Scott Carey wrote: > And there is an OS component to it too. You can actually get away with > shared_buffers at 90% of RAM on Solaris. Linux will explode if you try > that (unless recent kernels have fixed its shared memory accounting). > You can use much larger values for shared_buffers on Solaris with UFS as the filesystem than almost anywhere else, as you say. UFS defaults to caching an extremely tiny amount of memory by default. Getting PostgreSQL to buffer everything therefore leads to minimal double-caching and little write caching that creates checkpoint spikes, so 90% is not impossible there. If you're using ZFS instead, that defaults to similar aggressive caching as Linux. You may even have to turn that down if you want the database to have a large amount of memory for its own use even with normal levels of sizing; just space for shared_buffers and work_mem can end up being too large of a pair of competitors for caching RAM. ZFS is not really not tuned all that differently from how Linux approaches caching in that regard. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books