Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1l5G-0000f5-CI for pgsql-bugs@postgresql.org; Wed, 15 Aug 2012 21:24:58 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T1l5D-0002Nx-RD for pgsql-bugs@postgresql.org; Wed, 15 Aug 2012 21:24:58 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id q7FLOl920303 for ; Wed, 15 Aug 2012 14:24:47 -0700 Message-ID: <502C139A.1080408@hogranch.com> Date: Wed, 15 Aug 2012 14:24:42 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: PostgreSQL Bugs Subject: Re: BUG #7494: WAL replay speed depends heavily on the shared_buffers size References: <20120815133622.GE25473@momjian.us> <502BA6BD.5070308@hogranch.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/111 X-Sequence-Number: 33835 On 08/15/12 9:02 AM, Valentine Gogichashvili wrote: > > On Wed, Aug 15, 2012 at 3:40 PM, John R Pierce > wrote: > > On 08/15/12 6:36 AM, Bruce Momjian wrote: > > We warn against making shared buffers > 8GB, and this is > perhaps another > good reason. > > > I generally keep it at no more than 2gb as I've never found any > performance improvements going higher, on systems with 48gb ram, > and had more than a few performance degradations with larger > shared buffers. > > > we see up to 10x performance increase with bigger shared_buffers in > case of this database. Main database entities are about 20GB in size > and we see that performance drops considerably when running with > smaller shared_buffers smaller then that. > do you adjust effective_cache_size accordingly? with the smaller shared_buffers, we typically find at least half or more of physical memory is available as OS level disk cache, as shown by the 'cached' output of 'free' or whatever after the system has been running long enough to fully populate its disk cache. this parameter has a significant performance impact on the planner's estimation of the best way of executing given queries. also, especially if you're executing queries that process a lot of rows and have to do sorts and such, increasing work_mem is quite helpful. -- john r pierce N 37, W 122 santa cruz ca mid-left coast