X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 69F729FB272 for ; Tue, 8 Aug 2006 09:38:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 05238-03 for ; Tue, 8 Aug 2006 12:38:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 498619FB21D for ; Tue, 8 Aug 2006 09:38:24 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 554D830E06; Tue, 8 Aug 2006 14:38:23 +0200 (MET DST) From: Christopher Browne X-Newsgroups: pgsql.performance Subject: Re: shared_buffer optimization Date: Tue, 08 Aug 2006 08:20:01 -0400 Organization: cbbrowne Computing Inc Lines: 37 Message-ID: <87u04nv2q6.fsf@wolfe.cbbrowne.com> References: <44D86A00.90106@rentalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (linux) Cancel-Lock: sha1:OHRWAM5s2qHuketf3GONu/CmfT8= To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.273 tagged_above=0 required=5 tests=INFO_TLD X-Spam-Level: * X-Archive-Number: 200608/100 X-Sequence-Number: 20285 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. -- let name="cbbrowne" and tld="acm.org" in name ^ "@" ^ tld;; http://linuxdatabases.info/info/x.html Rules of the Evil Overlord #25. "No matter how well it would perform, I will never construct any sort of machinery which is completely indestructible except for one small and virtually inaccessible vulnerable spot."