Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TM3R0-0000l3-Fe for pgsql-performance@postgresql.org; Wed, 10 Oct 2012 21:03:18 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TM3Qz-0004C5-97 for pgsql-performance@postgresql.org; Wed, 10 Oct 2012 21:03:17 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1TM3Qx-0005ah-LL; Wed, 10 Oct 2012 17:03:15 -0400 Date: Wed, 10 Oct 2012 17:03:15 -0400 From: Bruce Momjian To: Strahinja =?utf-8?B?S3VzdHVkacSH?= Cc: Jeff Janes , pgsql-performance@postgresql.org Subject: Re: shared_buffers/effective_cache_size on 96GB server Message-ID: <20121010210315.GI11892@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -4.0 (----) X-Archive-Number: 201210/133 X-Sequence-Number: 48092 On Wed, Oct 10, 2012 at 10:12:51PM +0200, Strahinja Kustudić wrote: > @Bruce Thanks for your articles, after reading them all I don't think disabling > swap is a good idea now. Also you said to see the effective_cache_size I should > check it with free. My question is should I use the value that free is showing > as cached, or a little lower one, since not everything in the cache is because > of Postgres. Well, you are right that some of that might not be Postgres, so yeah, you can lower it somewhat. > @Claudio So you are basically saying that if I have set effective_cache_size to > 10GB and I have 10 concurrent processes which are using 10 different indices > which are for example 2GB, it would be better to set the effective_cache size > to 1GB? Since if I leave it at 10GB each running process query planner will > think the whole index is in cache and that won't be true? Did I get that right? Well, the real question is whether, while traversing the index, if some of the pages are going to be removed from the cache by other process cache usage. effective_cache_size is not figuring the cache will remain between queries. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +