Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLymu-0001ic-Qr for pgsql-performance@postgresql.org; Wed, 10 Oct 2012 16:05:36 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLymt-0008Pb-E6 for pgsql-performance@postgresql.org; Wed, 10 Oct 2012 16:05:35 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1TLyms-0004uT-LZ; Wed, 10 Oct 2012 12:05:34 -0400 Date: Wed, 10 Oct 2012 12:05:34 -0400 From: Bruce Momjian To: Strahinja =?utf-8?B?S3VzdHVkacSH?= Cc: pgsql-performance@postgresql.org Subject: Re: shared_buffers/effective_cache_size on 96GB server Message-ID: <20121010160534.GD11892@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/118 X-Sequence-Number: 48077 On Wed, Oct 10, 2012 at 09:12:20AM +0200, Strahinja Kustudić wrote: > Hi everyone, > > I have a Postgresql 9.1 dedicated server with 16 cores, 96GB RAM and RAID10 15K > SCSI drives which is runing Centos 6.2 x64. This server is mainly used for > inserting/updating large amounts of data via copy/insert/update commands, and > seldom for running select queries. > > Here are the relevant configuration parameters I changed: > > shared_buffers = 10GB > effective_cache_size = 90GB > work_mem = 32MB > maintenance_work_mem = 512MB > checkpoint_segments = 64 > checkpoint_completion_target = 0.8 > > My biggest concern are shared_buffers and effective_cache_size, should I > increase shared_buffers and decrease effective_cache_size? I read that values > above 10GB for shared_buffers give lower performance, than smaller amounts? > > free is currently reporting (during the loading of data): > > $ free -m > total used free shared buffers cached > Mem: 96730 96418 311 0 71 93120 > -/+ buffers/cache: 3227 93502 > Swap: 21000 51 20949 > > So it did a little swapping, but only minor, still I should probably decrease > shared_buffers so there is no swapping at all. You might want to read my blog entry about swap space: http://momjian.us/main/blogs/pgblog/2012.html#July_25_2012 It is probably swapping unused memory _out_ to make more use of RAM for cache. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +