X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 717239FA38F for ; Tue, 13 Jun 2006 20:17:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 43857-05 for ; Tue, 13 Jun 2006 20:17:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 8078E9FA1A8 for ; Tue, 13 Jun 2006 20:17:32 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 3724D56435; Tue, 13 Jun 2006 18:17:31 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 13 Jun 2006 18:17:30 -0500 Date: Tue, 13 Jun 2006 18:17:30 -0500 From: "Jim C. Nasby" To: Mischa Sandberg Cc: pgsql-performance@postgresql.org Subject: Re: Solaris shared_buffers anomaly? Message-ID: <20060613231730.GS34196@pervasive.com> References: <1150151282.14661.42.camel@tigger> <20060613000441.GI8588@kenobi.snowman.net> <20060613200810.GZ34196@pervasive.com> <448F3A6E.6080908@ca.sophos.com> <20060613224759.GM34196@pervasive.com> <448F4842.4010305@ca.sophos.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <448F4842.4010305@ca.sophos.com> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060613:mischa@ca.sophos.com::iBC2bNytH6f5X5BF:00000000000000000 0000000000000000000000001qEt X-Hashcash: 1:20:060613:pgsql-performance@postgresql.org::Li8tRixyCTxUpK8F:00000 0000000000000000000000001Uq3 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/228 X-Sequence-Number: 19585 On Tue, Jun 13, 2006 at 04:20:34PM -0700, Mischa Sandberg wrote: > Jim C. Nasby wrote: > >On Tue, Jun 13, 2006 at 03:21:34PM -0700, Mischa Sandberg wrote: > >>Raised shared_buffers to 16000 (128MB). > >>DB server dropped to a CRAWL. > >> > >>vmstat showed that it was swapping like crazy. > >>Dropped shared_buffers back down again. > >>Swapping stopped. > > > >What's sort_mem set to? I suspect you simply ran the machine out of > >memory. > > 8192 (8MB). No issue when shared_buffers was 2000; same apps always. So if all 50 backends were running a sort, you'd use 400MB. The box has 4G, right? > >Also, Solaris by default will only use a portion of memory for > >filesystem caching, which will kill PostgreSQL performance. > > Yep, tested /etc/system segmap_percent at 20,40,60. > No significant difference between 20 and 60. That's pretty disturbing... how large is your database? -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461