X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D6F4E528BB for ; Wed, 1 Jun 2005 04:23:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 57676-01 for ; Wed, 1 Jun 2005 07:23:47 +0000 (GMT) Received: from linda-4.paradise.net.nz (bm-4a.paradise.net.nz [202.0.58.23]) by svr1.postgresql.org (Postfix) with ESMTP id 260BE5287E for ; Wed, 1 Jun 2005 04:23:42 -0300 (ADT) Received: from smtp-1.paradise.net.nz (smtp-1a.paradise.net.nz [202.0.32.194]) by linda-4.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IHE00J1X9VI6L@linda-4.paradise.net.nz> for pgsql-performance@postgresql.org; Wed, 01 Jun 2005 19:23:42 +1200 (NZST) Received: from [192.168.1.11] (218-101-13-29.paradise.net.nz [218.101.13.29]) by smtp-1.paradise.net.nz (Postfix) with ESMTP id 0C92E83725; Wed, 01 Jun 2005 19:22:45 +1200 (NZST) Date: Wed, 01 Jun 2005 19:22:42 +1200 From: Mark Kirkwood Subject: Re: postgresql-8.0.1 performance tuning In-reply-to: <429D5942.6020502@streppone.it> To: Cosimo Streppone Cc: Postgresql Performance Message-id: <429D6242.6000804@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=UTF-8 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050511) References: <1117201312.7060.6.camel@fandelm.ecommit.de> <429D47FD.7090501@streppone.it> <429D56B2.9070302@paradise.net.nz> <429D5942.6020502@streppone.it> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.178 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/5 X-Sequence-Number: 12643 Cosimo Streppone wrote: > Mark Kirkwood ha scritto: > >> Cosimo Streppone wrote: >> >>> ######### Config ############ >>> >>>> /etc/sysctl.conf: >>>> kernel.shmall = 786432000 >>>> kernel.shmmax = 786432000 >>> >>> >>> I think you have a problem here. >>> kernel.shmmax should *not* be set to an amount of RAM, but > > > Sorry, I thought "shmall" but written "shmmax". > Thanks Mark! > Hehe - happens to me all the time! On the shmall front - altho there is *probably* no real performance impact setting it to the same as shmmax (i.e. allowing 4096 allocations of size shmmax!), it is overkill. In addition it does allow for a DOS by a program that allocates thousands of segments (or somehow starts thousands of Pg servers on different ports...)! For a dedicated Pg server I would size shmall using a calculation along the lines of: shmall = (no. of postgresql servers) * (shmmax/4096) If there are other daemons on the box that need to use shared memory, then add their likely requirements to shmall too! cheers Mark