pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Browne <cbbrowne@acm.org>
To: pgsql-performance@postgresql.org
Subject: Re: shared_buffer optimization
Date: Tue, 08 Aug 2006 08:20:01 -0400
Message-ID: <87u04nv2q6.fsf@wolfe.cbbrowne.com> (raw)
References: <44D86A00.90106@rentalia.com>

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." <http://www.eviloverlord.com/;



view thread (5+ messages)  latest in thread

Message-ID: <87u04nv2q6.fsf@wolfe.cbbrowne.com>
Permalink:  ../87u04nv2q6.fsf@wolfe.cbbrowne.com/
Also on:    postgresql.org/message-id/87u04nv2q6.fsf@wolfe.cbbrowne.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: shared_buffer optimization
  In-Reply-To: <87u04nv2q6.fsf@wolfe.cbbrowne.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox