Re: [ADMIN] shared_buffers and shmmax - Mailing list pgsql-docs
From | Bruce Momjian |
---|---|
Subject | Re: [ADMIN] shared_buffers and shmmax |
Date | |
Msg-id | 200812170133.mBH1Xac23918@momjian.us Whole thread Raw |
In response to | Re: [ADMIN] shared_buffers and shmmax (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: [ADMIN] shared_buffers and shmmax
|
List | pgsql-docs |
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. + 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>
pgsql-docs by date: