pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 <bitsandbytes88@hotmail.com>
Subject: Re: [ADMIN] shared_buffers and shmmax
Date: Tue, 16 Dec 2008 20:33:36 -0500 (EST)
Message-ID: <200812170133.mBH1Xac23918@momjian.us> (raw)
In-Reply-To: <17528.1229470697@sss.pgh.pa.us>

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > OK, updated patch.  I added item descriptions and removed Alvaro's
> > paragraph;  I worked with Alvaro on this patch.
> 
> This still seems pretty misleading, as for example
>   
> >        <tbody>
> >         <row>
> >          <entry><xref linkend="guc-max-connections"></>
> > !        <entry>1800 + 270 * <xref
> > !        linkend="guc-max-locks-per-transaction"> bytes per connection</entry>
> >         </row>
> 
> sounds like it might mean bytes per *active* connection, when of course
> the correct way to figure it is by multiplying by max_connections.
> If you're going to give a formula, why not just give a formula, eg
> 
> 	(1800 + 270 * max_locks_per_transaction) * (max_connections + autovacuum_max_workers)
> 
> 			regards, tom lane

You mean like this:

	http://momjian.us/tmp/pgsql/kernel-resources.html

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Attachments:

/pgpatches/shared_mem_table (text/plain, 3.4K) download Index: doc/src/sgml/runtime.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v retrieving revision 1.423 diff -c -c -r1.423 runtime.sgml *** doc/src/sgml/runtime.sgml 16 Dec 2008 19:30:43 -0000 1.423 --- doc/src/sgml/runtime.sgml 17 Dec 2008 01:30:21 -0000 *************** *** 1087,1141 **** <thead> <row> <entry>Name</> ! <entry>Approximate multiplier (bytes per increment) as of 8.3</> </row> </thead> <tbody> <row> ! <entry><xref linkend="guc-max-connections"></> ! <entry>1800 + 270 * <xref linkend="guc-max-locks-per-transaction"></entry> ! </row> ! ! <row> ! <entry><xref linkend="guc-autovacuum-max-workers"></> ! <entry>1800 + 270 * <xref linkend="guc-max-locks-per-transaction"></entry> </row> <row> <entry><xref linkend="guc-max-prepared-transactions"></> ! <entry>770 + 270 * <xref linkend="guc-max-locks-per-transaction"></entry> </row> <row> <entry><xref linkend="guc-shared-buffers"></> ! <entry>8400 (assuming 8 kB <symbol>BLCKSZ</>)</entry> </row> <row> <entry><xref linkend="guc-wal-buffers"></> ! <entry>8200 (assuming 8 kB <symbol>XLOG_BLCKSZ</>)</entry> </row> <row> <entry>Fixed space requirements</> ! <entry>770 kB</entry> </row> </tbody> </tgroup> </table> ! <note> ! <para> ! The multipliers for <varname>shared_buffers</> and ! <varname>wal_buffers</> should be the number of buffers, not the ! amount in bytes. To find out the number of shared or wal buffers, divide ! the amount in bytes by <xref linkend="guc-block-size"> and ! <xref linkend="guc-wal-block-size">, respectively. ! </para> ! </note> ! </sect2> ! <sect2> <title>Resource Limits</title> --- 1087,1132 ---- <thead> <row> <entry>Name</> ! <entry>Shared memory bytes required, as of 8.3</> </row> </thead> <tbody> <row> ! <entry><xref linkend="guc-max-connections">, <xref linkend="guc-autovacuum-max-workers"></> ! <entry>(1800 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * (<xref ! linkend="guc-max-connections"> + <xref linkend="guc-autovacuum-max-workers">)</entry> </row> <row> <entry><xref linkend="guc-max-prepared-transactions"></> ! <entry>(770 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * <xref linkend="guc-max-prepared-transactions"></entry> </row> <row> <entry><xref linkend="guc-shared-buffers"></> ! <entry>(<xref linkend="guc-block-size"> + 208) * <xref linkend="guc-shared-buffers"></entry> </row> <row> <entry><xref linkend="guc-wal-buffers"></> ! <entry>(<xref linkend="guc-wal-block-size"> + 8) * <xref linkend="guc-wal-buffers"></entry> </row> <row> <entry>Fixed space requirements</> ! <entry>770k bytes</entry> </row> </tbody> </tgroup> </table> ! <para> ! These shared memory allocations are reserved at database server ! start and remain static. ! </para> <sect2> <title>Resource Limits</title>

view thread (28+ messages)  latest in thread

Message-ID: <200812170133.mBH1Xac23918@momjian.us>
Permalink:  ../200812170133.mBH1Xac23918@momjian.us/
Also on:    postgresql.org/message-id/200812170133.mBH1Xac23918@momjian.us

 · 

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-admin@postgresql.org
  Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, alvherre@commandprompt.com, bitsandbytes88@hotmail.com
  Subject: Re: [ADMIN] shared_buffers and shmmax
  In-Reply-To: <200812170133.mBH1Xac23918@momjian.us>

* 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