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 308F19FB2B3 for ; Wed, 9 Aug 2006 07:50:33 -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 27618-07 for ; Wed, 9 Aug 2006 07:50:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.rentalia.net (mail.rentalia.com [213.192.209.8]) by postgresql.org (Postfix) with ESMTP id AD0229F95E1 for ; Wed, 9 Aug 2006 07:50:25 -0300 (ADT) Received: (qmail 20915 invoked by uid 514); 9 Aug 2006 12:50:22 +0200 Received: from 62.37.216.88 by rigodon (envelope-from , uid 512) with qmail-scanner-1.25-st-qms (clamdscan: 0.88/1284. spamassassin: 3.0.2. perlscan: 1.25-st-qms. Clear:RC:0(62.37.216.88):SA:0(-2.3/5.0):. Processed in 3.807291 secs); 09 Aug 2006 10:50:22 -0000 X-Antivirus-MYDOMAIN-Mail-From: ruben@rentalia.com via rigodon X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:0(62.37.216.88):SA:0(-2.3/5.0):. Processed in 3.807291 secs Process 20879) Received: from 62-37-216-88.mad1.adsl.uni2.es (HELO ?192.168.2.28?) (ruben@rentalia.com@62.37.216.88) by mail.rentalia.net with SMTP; 9 Aug 2006 12:50:18 +0200 Message-ID: <44D9BDE5.9060202@rentalia.com> Date: Wed, 09 Aug 2006 12:50:13 +0200 From: Ruben Rubio User-Agent: Thunderbird 1.5.0.5 (X11/20060728) MIME-Version: 1.0 To: Christopher Browne CC: pgsql-performance@postgresql.org Subject: Re: shared_buffer optimization References: <44D86A00.90106@rentalia.com> <87u04nv2q6.fsf@wolfe.cbbrowne.com> In-Reply-To: <87u04nv2q6.fsf@wolfe.cbbrowne.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.235 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/139 X-Sequence-Number: 20324 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 So ... I have tried different values. The best one for one day sentences seems to be 24576 IO in vmstat has the lowest values "id" (idle) has the biggest values. I have created an script that executes all day sentences to try that. By the way, could u explain a little bit this? "The "rule of thumb" is to set shared buffers to the lesser of 10000 and 15% of system memory. In your case, that would be the lesser of 10000 and 78643, which is 10000." Im sorry but im not understanding it at all. Thanks in advance. Christopher Browne wrote: > Quoth ruben@rentalia.com (Ruben Rubio): >> Hi, I have a question with shared_buffer. >> >> Ok, I have a server with 4GB of RAM >> ----- >> # cat /proc/meminfo >> MemTotal: 4086484 kB >> [...] >> ----- >> >> So, if I want to, for example, shared_buffer to take 3 GB of RAM then >> shared_buffer would be 393216 (3 * 1024 * 1024 / 8) >> >> Postmaster dont start. >> Error: FATAL: shmat(id=360448) failed: Invalid argument >> >> >> I can set a less value, but not higher than 3 GB. >> >> Am I doing something wrong? >> Any idea? > > Yes, you're trying to set the value way too high. > > The "rule of thumb" is to set shared buffers to the lesser of 10000 > and 15% of system memory. In your case, that would be the lesser of > 10000 and 78643, which is 10000. > > I'm not aware of any actual evidence having emerged that it is of any > value to set shared buffers higher than 10000. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE2b3kIo1XmbAXRboRAh12AKCodmhmXZWamrG7MnAf9mhVfubjgwCfa75v 7bgmSzq4F7XpBoEkSpyDqnE= =3lMc -----END PGP SIGNATURE-----