From bitsandbytes88@hotmail.com Wed Jun 3 03:46:52 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7218F64FD0F for ; Tue, 22 Jul 2008 10:40:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 23868-03 for ; Tue, 22 Jul 2008 10:39:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from blu0-omc1-s32.blu0.hotmail.com (blu0-omc1-s32.blu0.hotmail.com [65.55.116.43]) by postgresql.org (Postfix) with ESMTP id 4DCB865016A for ; Tue, 22 Jul 2008 10:39:59 -0300 (ADT) Received: from BLU144-W43 ([65.55.116.9]) by blu0-omc1-s32.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 22 Jul 2008 06:39:58 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_5981ec56-bdc7-4d82-909d-ed77cc0d0e32_" X-Originating-IP: [204.132.58.73] From: dx k9 To: posgres support Subject: shared_buffers and shmmax Date: Tue, 22 Jul 2008 09:39:57 -0400 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 22 Jul 2008 13:39:58.0015 (UTC) FILETIME=[6E9F54F0:01C8EC00] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/185 X-Sequence-Number: 29795 --_5981ec56-bdc7-4d82-909d-ed77cc0d0e32_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=2C I'm trying to understand what the documentation means by bytes per incremen= t=2C what is the increment supposed to be bytes=2C MB=2C or Kb. I have my = shared_buffers set to 577 MB(4 instances) and I'm multiplying by 8400 bytes= . I would think I would want to keep everything in bytes and not mulitply = bytes times MB=2C but this is what table 17-2 implies. If I convert 577 to= bytes and multiply=2C my calculator goes exponential on me. I'm going thro= ugh this table and adding up to see what my shmmax should be (it's 7.5 GB) = out of a total memory of 16 GB with 1000 max_connections right now. What s= hould I use as the "increment" value in regards to shared buffers=2C 577=2C= 590848 or 605028352 ?=20 =20 a) 577 MB (This seems too small) b) 590=2C848 Kb (this seems just right) c) 605=2C028=2C352 bytes (this seems too big=2C I hope it's not c) =20 Thanks=2C ~DjK =20 Table 17-2. Configuration parameters affecting PostgreSQL's shared memory u= sage Name Approximate multiplier (bytes per increment) as of 8.3 max_connections 1800 + 270 * max_locks_per_transaction autovacuum_max_workers 1800 + 270 * max_locks_per_transaction max_prepared_transactions 770 + 270 * max_locks_per_transaction shared_buffers 8400 (assuming 8 kB BLCKSZ) wal_buffers 8200 (assuming 8 kB XLOG_BLCKSZ) max_fsm_relations 70 max_fsm_pages 6 Fixed space requirements 770 kB _________________________________________________________________ Stay in touch when you're away with Windows Live Messenger. http://www.windowslive.com/messenger/overview.html?ocid=3DTXT_TAGLM_WL_mess= enger2_072008= --_5981ec56-bdc7-4d82-909d-ed77cc0d0e32_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=2C
I'm trying to understand what the documentation means by bytes per incremen= t=2C what is the increment supposed to be bytes=2C MB=2C or Kb. =3B I h= ave my shared_buffers set to 577 MB(4 instances) =3Band I'm multiplying= by 8400 bytes. =3B I would think I would want to keep everything in by= tes and not mulitply bytes times MB=2C but this is what table 17-2 implies.=  =3B If I convert 577 to bytes and multiply=2C my calculator goes expon= ential on me. I'm going through this table and adding up to see what my shm= max should be (it's 7.5 GB) out of a total memory of 16 GB with 1000 max_co= nnections right now. =3B What should I use as the "increment" value in = regards to shared buffers=2C 577=2C 590848 or 605028352 =3B?
 =3B
a) 577 MB (This seems too small)
b) 590=2C848 Kb (this seems just right)
c) 605=2C028=2C352 bytes =3B (this seems too big=2C I hope it's not c)<= BR>  =3B
Thanks=2C
~DjK
 =3B
Table 17-2. Configuration parameters affecting PostgreSQL's shared memory usage
Name Approximate multiplier (bytes per increment) as of 8.3
max_connecti= ons 1800 + 270 * max_locks_per_transaction
autov= acuum_max_workers 1800 + 270 * max_locks_per_transaction
max_= prepared_transactions 770 + 270 * max_locks_per_transaction
shared_buffers<= /FONT> 8400 (assuming 8 kB BLCKSZ)
wal_buffers<= /A> 8200 (assuming 8 kB XLOG_BLCKSZ)
max_fsm_rela= tions 70
max_fsm_pages 6
Fixed space requirements 770 kB



Stay in touch when you'= re away with Windows Live Messenger. IM anytime you're online. = --_5981ec56-bdc7-4d82-909d-ed77cc0d0e32_-- From valiouk@yahoo.co.uk Wed Jun 3 03:46:52 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D99D164FD1A for ; Tue, 22 Jul 2008 11:08:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49812-03 for ; Tue, 22 Jul 2008 11:08:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web25804.mail.ukl.yahoo.com (web25804.mail.ukl.yahoo.com [217.12.10.189]) by postgresql.org (Postfix) with SMTP id 9B54D64FD29 for ; Tue, 22 Jul 2008 11:08:36 -0300 (ADT) Received: (qmail 79995 invoked by uid 60001); 22 Jul 2008 14:08:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=N3vj6K1D3uRT6kcFLyh4wt8Fpe4UB6cNDz0nONx0xr123nxT43TdkXtol2R/G6v7gz/GS6mRkwvXFpcr33qIXsr2ECztiJsIEAsbkgZxlI1fA/g1baHno3lJzxdf8aahP5FgpPzkBvfUG432sWZTNqSx7imkMgkeP3v1dn+4KoE=; Received: from [62.254.183.162] by web25804.mail.ukl.yahoo.com via HTTP; Tue, 22 Jul 2008 14:08:32 GMT X-Mailer: YahooMailWebService/0.7.218 Date: Tue, 22 Jul 2008 14:08:32 +0000 (GMT) From: Valentin Bogdanov Reply-To: valiouk@yahoo.co.uk Subject: Re: shared_buffers and shmmax To: posgres support , dx k9 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <818191.79570.qm@web25804.mail.ukl.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.315 tagged_above=0 required=5 tests=SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 200807/186 X-Sequence-Number: 29796 shared_buffers is in disk block size, typically 8K, at least that's what it= is on Linux platforms. shmmax is quite simply in bytes. The default shared_buffer of a 1000 is quite conservative. A good starting = value is something like 15-25 percent of your main memory or so I am being = told. It really depends on how the machine you have your database on is bei= ng used. If postgres is the only application using your box then you can ev= en set this to 80% of the memory. You're fine as long as postgres does not = have to resort to using the swap space. If you set shared_buffers so high that it doesn't agree with your systems s= hmmax then postgres will give you the required value on startup. Regards, Val --- On Tue, 22/7/08, dx k9 wrote: > From: dx k9 > Subject: [ADMIN] shared_buffers and shmmax > To: "posgres support" > Date: Tuesday, 22 July, 2008, 2:39 PM > Hi, > I'm trying to understand what the documentation means > by bytes per increment, what is the increment supposed to > be bytes, MB, or Kb. I have my shared_buffers set to 577 > MB(4 instances) and I'm multiplying by 8400 bytes. I > would think I would want to keep everything in bytes and > not mulitply bytes times MB, but this is what table 17-2 > implies. If I convert 577 to bytes and multiply, my > calculator goes exponential on me. I'm going through > this table and adding up to see what my shmmax should be > (it's 7.5 GB) out of a total memory of 16 GB with 1000 > max_connections right now. What should I use as the > "increment" value in regards to shared buffers, > 577, 590848 or 605028352 ?=20 > =20 > a) 577 MB (This seems too small) > b) 590,848 Kb (this seems just right) > c) 605,028,352 bytes (this seems too big, I hope it's > not c) > =20 > Thanks, > ~DjK > =20 > Table 17-2. Configuration parameters affecting > PostgreSQL's shared memory usage >=20 >=20 >=20 >=20 >=20 >=20 >=20 > Name > Approximate multiplier (bytes per increment) as of 8.3 >=20 >=20 > max_connections > 1800 + 270 * max_locks_per_transaction >=20 > autovacuum_max_workers > 1800 + 270 * max_locks_per_transaction >=20 > max_prepared_transactions > 770 + 270 * max_locks_per_transaction >=20 > shared_buffers > 8400 (assuming 8 kB BLCKSZ) >=20 > wal_buffers > 8200 (assuming 8 kB XLOG_BLCKSZ) >=20 > max_fsm_relations > 70 >=20 > max_fsm_pages > 6 >=20 > Fixed space requirements > 770 kB > _________________________________________________________________ > Stay in touch when you're away with Windows Live > Messenger. > http://www.windowslive.com/messenger/overview.html?ocid=3DTXT_TAGLM_WL_me= ssenger2_072008=0A=0A=0A _____________________________________________= _____________=0ANot happy with your email address?.=0AGet the one you reall= y want - millions of new email addresses available now at Yahoo! http://uk.= docs.yahoo.com/ymail/new.html From tgl@sss.pgh.pa.us Wed Jun 3 03:46:52 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id EC01B64FD23 for ; Tue, 22 Jul 2008 11:46:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75521-03-4 for ; Tue, 22 Jul 2008 11:46:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 0EE2865016A for ; Tue, 22 Jul 2008 11:46:04 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6MEjxJQ028168; Tue, 22 Jul 2008 10:45:59 -0400 (EDT) To: valiouk@yahoo.co.uk cc: pgsql-docs@postgreSQL.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax In-reply-to: <818191.79570.qm@web25804.mail.ukl.yahoo.com> References: <818191.79570.qm@web25804.mail.ukl.yahoo.com> Comments: In-reply-to Valentin Bogdanov message dated "Tue, 22 Jul 2008 14:08:32 -0000" Date: Tue, 22 Jul 2008 10:45:59 -0400 Message-ID: <28167.1216737959@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/6 X-Sequence-Number: 4937 [ redirecting to pgsql-docs ] Valentin Bogdanov writes: >> From: dx k9 >> I'm trying to understand what the documentation means >> by bytes per increment, what is the increment supposed to >> be bytes, MB, or Kb. > shared_buffers is in disk block size, typically 8K, at least that's what it is on Linux platforms. shmmax is quite simply in bytes. The table the OP is looking at (table 17.2 in the 8.3 docs) predates the ability to specify shared_buffers in KB or MB instead of number-of-buffers. I agree it's not entirely obvious that what it means is "multiply your setting in KB/MB by 8400/8192". Anybody have an idea how to clarify things? regards, tom lane From lists@stringsutils.com Wed Jun 3 03:46:52 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 612BB6501F6 for ; Tue, 22 Jul 2008 17:14:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21737-04-4 for ; Tue, 22 Jul 2008 17:13:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zoraida.natserv.net (p65-147.acedsl.com [66.114.65.147]) by postgresql.org (Postfix) with ESMTP id 14FA8650215 for ; Tue, 22 Jul 2008 16:30:23 -0300 (ADT) Received: from mail.natserv.com (localhost.natserv.net [127.0.0.1]) by zoraida.natserv.net (Postfix) with SMTP id 4D67E1703C; Tue, 22 Jul 2008 15:30:21 -0400 (EDT) Message-ID: <7262a9b6ab4a76eab29fc9d94226baec@stringsutils.com> Date: Tue, 22 Jul 2008 15:30:21 -0400 From: "Francisco Reyes" Subject: Re: [ADMIN] shared_buffers and shmmax To: Tom Lane Cc: , , Reply-to: In-Reply-To: <28167.1216737959@sss.pgh.pa.us> References: <818191.79570.qm@web25804.mail.ukl.yahoo.com> <28167.1216737959@sss.pgh.pa.us> X-Mailer: Hastymail 1.5 x-priority: 3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/7 X-Sequence-Number: 4938 On 10:45 am 07/22/08 Tom Lane wrote: > [ redirecting to pgsql-docs ] > number-of-buffers. I agree it's not entirely obvious that what it > means is "multiply your setting in KB/MB by 8400/8192". Anybody have > an idea how to clarify things? Perhaps changing the table title? Table 17-2. Configuration parameters affecting PostgreSQL's shared memory usage when not using a size modified. Alternatively, below the table we could have clarifications such as: Previously, it was not possible to indicate a size modified such as M for Megabytes. As of version X.Y, Postgresql allows to use M, for MB, GB for GB and more... See.... for all values. When not using one of the new modifiers the space used would be the number you enter times the constant on the right side of the table. For example using 100 shared_buffers would be 100 x 8400 = 840,000 bytes. From greg@turnstep.com Wed Jun 3 03:47:37 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9CADC6502AF; Thu, 24 Jul 2008 14:54:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18700-08; Thu, 24 Jul 2008 14:54:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tinlc.com (unknown [72.18.206.65]) by postgresql.org (Postfix) with ESMTP id C77F565020C; Thu, 24 Jul 2008 14:54:33 -0300 (ADT) Received: from biglumber.com ([72.18.206.64] helo=localhost) by tinlc.com with smtp (Exim 4.60) (envelope-from ) id 1KM51L-0000en-NF; Thu, 24 Jul 2008 12:54:31 -0500 From: "Greg Sabino Mullane" To: pgsql-docs@postgresql.org Cc: pgsql-hackers@postgresql.org CC: pgsql-hackers@postgresql.org Subject: Re: [ADMIN] shared_buffers and shmmax X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <28167.1216737959@sss.pgh.pa.us> Date: Thu, 24 Jul 2008 17:54:31 -0000 X-Mailer: JoyMail 2.01 Message-ID: <3bd4182ebf79bc4a171f08d03d2edb2f@biglumber.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=0 required=5 tests=RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200807/8 X-Sequence-Number: 4939 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 NotDashEscaped: You need GnuPG to verify this message >> shared_buffers is in disk block size, typically 8K > The table the OP is looking at (table 17.2 in the 8.3 docs) predates > the ability to specify shared_buffers in KB or MB instead of > number-of-buffers. I agree it's not entirely obvious that what it > means is "multiply your setting in KB/MB by 8400/8192". Anybody have > an idea how to clarify things? Bite the bullet and start showing the buffer settings as a pure number of bytes everywhere, and get rid of the confusing '8kB' unit in pg_settings? Things like this don't help our cause: test=# show shared_buffers; shared_buffers ---------------- 24MB (1 row) test=# set temp_buffers = '24MB'; SET test=# show temp_buffers; temp_buffers -------------- 3072 test=# select name, setting from pg_settings where name ~ 'buffers'; name | setting ----------------+--------- shared_buffers | 3072 temp_buffers | 3072 wal_buffers | 8 test=# show wal_buffers; wal_buffers ------------- 64kB -- Greg Sabino Mullane greg@turnstep.com End Point Corporation PGP Key: 0x14964AC8 200807241351 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAkiIwYYACgkQvJuQZxSWSsiY5wCfU/tca+1JakWaMCDDRHEHk/Uj 1rcAoMi1FNGSpJhyXWde1psygq6v3MlS =gCPg -----END PGP SIGNATURE----- From jd@commandprompt.com Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 07B38650308; Thu, 24 Jul 2008 15:02:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26783-06; Thu, 24 Jul 2008 15:02:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 2FCB3650332; Thu, 24 Jul 2008 15:02:40 -0300 (ADT) Received: from [192.168.1.5] (or-69-34-217-90.sta.embarqhsd.net [69.34.217.90]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m6OI572l004349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Jul 2008 11:05:07 -0700 Subject: Re: [DOCS] [ADMIN] shared_buffers and shmmax From: "Joshua D. Drake" To: Greg Sabino Mullane Cc: pgsql-docs@postgresql.org, pgsql-hackers@postgresql.org In-Reply-To: <3bd4182ebf79bc4a171f08d03d2edb2f@biglumber.com> References: <3bd4182ebf79bc4a171f08d03d2edb2f@biglumber.com> Content-Type: text/plain Organization: Command Prompt, Inc. Date: Thu, 24 Jul 2008 11:02:39 -0700 Message-Id: <1216922559.6858.56.camel@jd-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Thu, 24 Jul 2008 11:05:08 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/1142 X-Sequence-Number: 121402 On Thu, 2008-07-24 at 17:54 +0000, Greg Sabino Mullane wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: RIPEMD160 > NotDashEscaped: You need GnuPG to verify this message > > > >> shared_buffers is in disk block size, typically 8K > > > The table the OP is looking at (table 17.2 in the 8.3 docs) predates > > the ability to specify shared_buffers in KB or MB instead of > > number-of-buffers. I agree it's not entirely obvious that what it > > means is "multiply your setting in KB/MB by 8400/8192". Anybody have > > an idea how to clarify things? > > Bite the bullet and start showing the buffer settings as a pure number of bytes > everywhere, and get rid of the confusing '8kB' unit in pg_settings? +1 We have helper functions like pg_size_pretty() to resolve the other issues. Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.postgresqlconference.org/ United States PostgreSQL Association: http://www.postgresql.us/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate From gsmith@gregsmith.com Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 03481650436; Sat, 26 Jul 2008 18:49:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91040-05; Sat, 26 Jul 2008 18:48:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id 6E66C65042B; Sat, 26 Jul 2008 18:47:08 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id m6QLl5la004034; Sat, 26 Jul 2008 17:47:06 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id m6QLl5lo004030; Sat, 26 Jul 2008 17:47:05 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Sat, 26 Jul 2008 17:47:05 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Greg Sabino Mullane cc: pgsql-docs@postgresql.org, pgsql-hackers@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <3bd4182ebf79bc4a171f08d03d2edb2f@biglumber.com> Message-ID: References: <3bd4182ebf79bc4a171f08d03d2edb2f@biglumber.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/9 X-Sequence-Number: 4940 On Thu, 24 Jul 2008, Greg Sabino Mullane wrote: > Bite the bullet and start showing the buffer settings as a pure number of bytes > everywhere, and get rid of the confusing '8kB' unit in pg_settings? There's already some changes needed in this area needed to execute the full GUC cleanup/wizard plan that's being worked on. The pg_settings view really should show the value both as the user input it and as it's stored internally for cases like these, which lowers the confusion here a bit even without going so far as converting everything to bytes. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD From bruce@momjian.us Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 93B9E65028E; Tue, 12 Aug 2008 14:49:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 69261-08; Tue, 12 Aug 2008 14:48:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 1FA3E65026D; Tue, 12 Aug 2008 14:48:43 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id m7CHmfX26268; Tue, 12 Aug 2008 13:48:41 -0400 (EDT) From: Bruce Momjian Message-Id: <200808121748.m7CHmfX26268@momjian.us> Subject: Re: [HACKERS] [ADMIN] shared_buffers and shmmax In-Reply-To: To: Greg Smith Date: Tue, 12 Aug 2008 13:48:41 -0400 (EDT) CC: Greg Sabino Mullane , pgsql-docs@postgresql.org, pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/2 X-Sequence-Number: 4942 Greg Smith wrote: > On Thu, 24 Jul 2008, Greg Sabino Mullane wrote: > > > Bite the bullet and start showing the buffer settings as a pure number of bytes > > everywhere, and get rid of the confusing '8kB' unit in pg_settings? > > There's already some changes needed in this area needed to execute the > full GUC cleanup/wizard plan that's being worked on. The pg_settings view > really should show the value both as the user input it and as it's stored > internally for cases like these, which lowers the confusion here a bit > even without going so far as converting everything to bytes. Is this a TODO? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + From gsmith@gregsmith.com Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BAC286502D0; Tue, 12 Aug 2008 16:43:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 89283-08; Tue, 12 Aug 2008 16:43:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id D24D5650278; Tue, 12 Aug 2008 16:43:51 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id m7CJhjjC005966; Tue, 12 Aug 2008 15:43:45 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id m7CJhiie005958; Tue, 12 Aug 2008 15:43:44 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Tue, 12 Aug 2008 15:43:44 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Bruce Momjian cc: Greg Sabino Mullane , pgsql-docs@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] [ADMIN] shared_buffers and shmmax In-Reply-To: <200808121748.m7CHmfX26268@momjian.us> Message-ID: References: <200808121748.m7CHmfX26268@momjian.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/3 X-Sequence-Number: 4943 On Tue, 12 Aug 2008, Bruce Momjian wrote: >> There's already some changes needed in this area needed to execute the >> full GUC cleanup/wizard plan that's being worked on. The pg_settings view >> really should show the value both as the user input it and as it's stored >> internally for cases like these, which lowers the confusion here a bit >> even without going so far as converting everything to bytes. > > Is this a TODO? I don't think you need yet another TODO for every detail, the existing TODO "Add external tool to auto-tune some postgresql.conf parameters" has to squash a bunch of issues in this area. This particular issue Greg raised will already be improved significantly if executing the larger project plan at http://wiki.postgresql.org/wiki/GUCS_Overhaul This week Robert Treat and I have been doing a lot of work on "Problem #1" there, "Most people have no idea how to set [GUCs]" which I know some people wanted to see a more formal document for before mucking with any of the code. I'll have something to announce there shortly. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD From decibel@decibel.org Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8C4076501BA; Fri, 22 Aug 2008 13:29:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21864-03-3; Fri, 22 Aug 2008 13:29:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id EF2EB65012B; Fri, 22 Aug 2008 13:28:49 -0300 (ADT) Received: from [192.168.42.125] (natpool.bovine.net [67.100.216.14]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTP id A79A5564CE; Fri, 22 Aug 2008 11:28:46 -0500 (CDT) In-Reply-To: References: <200808121748.m7CHmfX26268@momjian.us> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-19-558797505; protocol="application/pkcs7-signature" Message-Id: Cc: Bruce Momjian , Greg Sabino Mullane , pgsql-docs@postgresql.org, pgsql-hackers@postgresql.org From: Decibel! Subject: Re: [HACKERS] [ADMIN] shared_buffers and shmmax Date: Fri, 22 Aug 2008 00:49:23 -0500 To: Greg Smith X-Mailer: Apple Mail (2.753.1) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.854 tagged_above=0 required=5 tests=DATE_IN_PAST_06_12=1.854 X-Spam-Level: * X-Archive-Number: 200808/13 X-Sequence-Number: 4953 --Apple-Mail-19-558797505 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Aug 12, 2008, at 2:43 PM, Greg Smith wrote: > On Tue, 12 Aug 2008, Bruce Momjian wrote: >>> There's already some changes needed in this area needed to >>> execute the >>> full GUC cleanup/wizard plan that's being worked on. The >>> pg_settings view >>> really should show the value both as the user input it and as >>> it's stored >>> internally for cases like these, which lowers the confusion here >>> a bit >>> even without going so far as converting everything to bytes. >> >> Is this a TODO? > > I don't think you need yet another TODO for every detail, the > existing TODO "Add external tool to auto-tune some postgresql.conf > parameters" has to squash a bunch of issues in this area. This > particular issue Greg raised will already be improved significantly > if executing the larger project plan at http://wiki.postgresql.org/ > wiki/GUCS_Overhaul Yeah, but OTOH it's not clear at all when we might see such a tool, while clarifying this stuff would help people immediately... I think a TODO would be good to make sure this doesn't fall through the cracks. -- Decibel!, aka Jim C. Nasby, Database Architect decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 --Apple-Mail-19-558797505 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGtTCCAz8w ggKooAMCAQICAQ0wDQYJKoZIhvcNAQEFBQAwgdExCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0 ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEaMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcx KDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0 ZSBQZXJzb25hbCBGcmVlbWFpbCBDQTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxA dGhhd3RlLmNvbTAeFw0wMzA3MTcwMDAwMDBaFw0xMzA3MTYyMzU5NTlaMGIxCzAJBgNVBAYTAlpB MSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUg UGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA xKY8VXNV+065yplaHmjAdQRwnd/p/6Me7L3N9VvyGna9fww6YfK/Uc4B1OVQCjDXAmNaLIkVcI7d yfArhVqqP3FWy688Cwfn8R+RNiQqE88r1fOCdz0Dviv+uxg+B79AgAJk16emu59l0cUqVIUPSAR/ p7bRPGEEQB5kGXJgt/sCAwEAAaOBlDCBkTASBgNVHRMBAf8ECDAGAQH/AgEAMEMGA1UdHwQ8MDow OKA2oDSGMmh0dHA6Ly9jcmwudGhhd3RlLmNvbS9UaGF3dGVQZXJzb25hbEZyZWVtYWlsQ0EuY3Js MAsGA1UdDwQEAwIBBjApBgNVHREEIjAgpB4wHDEaMBgGA1UEAxMRUHJpdmF0ZUxhYmVsMi0xMzgw DQYJKoZIhvcNAQEFBQADgYEASIzRUIPqCy7MDaNmrGcPf6+svsIXoUOWlJ1/TCG4+DYfqi2fNi/A 9BxQIJNwPP2t4WFiw9k6GX6EsZkbAMUaC4J0niVQlGLH2ydxVyWN3amcOY6MIE9lX5Xa9/eH1sYI Tq726jTlEBpbNU1341YheILcIRk13iSx0x1G/11fZU8wggNuMIIC16ADAgECAhACpH6ZVSGg5xZh 5O/wRN/4MA0GCSqGSIb3DQEBBQUAMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29u c3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNz dWluZyBDQTAeFw0wNzEwMjkxOTE0NDdaFw0wODEwMjgxOTE0NDdaMIGqMQ4wDAYDVQQEEwVOYXNi eTETMBEGA1UEKhMKSmFtZXMgQ2FybDEZMBcGA1UEAxMQSmFtZXMgQ2FybCBOYXNieTEcMBoGCSqG SIb3DQEJARYNamltQG5hc2J5Lm5ldDEiMCAGCSqGSIb3DQEJARYTZGVjaWJlbEBkZWNpYmVsLm9y ZzEmMCQGCSqGSIb3DQEJARYXZGVjaWJlbEBkaXN0cmlidXRlZC5uZXQwggEiMA0GCSqGSIb3DQEB AQUAA4IBDwAwggEKAoIBAQDSgNcbvYYycE3FBX+z9i9zXtQxBalsoeDP92/jSG30Pq6HMlir3+lu rgZd5wBHRt/DMj+5ZfUDY9zQ7hfUio/WKQxRkXH46deV5xh9KNFf8kgxLiLKOBpesWFaXvNlnxU9 JKEpNZUnWeE8N/2mMWWs9L0Rfq0AxYa8TPfsbklALy1n9fY2yU1dNoT/s5tjRQK0UvzElimzMlOK 5PQuZ4atL9Jl6WCZb8811Qr+VUCFWz3e7HCgYDygwL+lBHlXEOLXPJ/lB8l61ugeooGjvuVdsaNf pM30pi5mwRECfOxo9zUL6uCHT6f4Dir6DsOIsTLb4N/vQjz+SGrLwtavSwRTAgMBAAGjWDBWMEYG A1UdEQQ/MD2BDWppbUBuYXNieS5uZXSBE2RlY2liZWxAZGVjaWJlbC5vcmeBF2RlY2liZWxAZGlz dHJpYnV0ZWQubmV0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEFBQADgYEApk/O70t8/38Jkp0M 9ywgSU2kn7w+Z3JN39pH3PnrLjmYV7D//2zJavR3zrZ4AeH2TDc/ioQTk1unfOYroYl+jUKD8NvU 8hbelR8pr+4hKMDx3+6plhKL0ZI9Zbw9DaJcZ3o8QK5fNGQooiz5+aCntbxdD81qG7+lkjQUUcvC wI0xggMQMIIDDAIBATB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGlu ZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBD QQIQAqR+mVUhoOcWYeTv8ETf+DAJBgUrDgMCGgUAoIIBbzAYBgkqhkiG9w0BCQMxCwYJKoZIhvcN AQcBMBwGCSqGSIb3DQEJBTEPFw0wODA4MjIwNTQ5MjNaMCMGCSqGSIb3DQEJBDEWBBTLo3NhVth9 7vTiiBgBqRFXs++IRDCBhQYJKwYBBAGCNxAEMXgwdjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMc VGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZy ZWVtYWlsIElzc3VpbmcgQ0ECEAKkfplVIaDnFmHk7/BE3/gwgYcGCyqGSIb3DQEJEAILMXigdjBi MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoG A1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEAKkfplVIaDnFmHk7/BE 3/gwDQYJKoZIhvcNAQEBBQAEggEAVIWXGG2s3UT1VMAoqP+mZNg5Gno5bV50zsHXW51dFK3i3rt4 o98H/IpZzfFLpf6FRVPIGyreP8VQ0cJXd4EUJjZP63g3em6fsT7gupx3POVXF7cJBGYE0G8U+s2n cL/oohQWSQtJ5FDpv7DzIkkRfusqaPcc7Dfvx2LN28zhh/wCo9NnuNTrxZfmaxXWF4WEvrDQ4ypR 0r8D2BlCo89MSsBT+uFTJgV90sWhTUTX44AJKbw1LW6yVQWIvNvUlfQ1rpvyS7hQLs+MuLDoGosJ yKoPAXBnQsncQO/PDuF9apP3AKYq0Gu9uVo4i8sz6Z9FEzRSqzxLu5WkRvjHxxHLswAAAAAAAA== --Apple-Mail-19-558797505-- From bruce@momjian.us Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2543764FD6D for ; Mon, 15 Dec 2008 19:23:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75016-05 for ; Mon, 15 Dec 2008 19:23:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 7F1ED64FCBE for ; Mon, 15 Dec 2008 19:23:04 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBFNN3Y25121; Mon, 15 Dec 2008 18:23:03 -0500 (EST) From: Bruce Momjian Message-Id: <200812152323.mBFNN3Y25121@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <28167.1216737959@sss.pgh.pa.us> To: Tom Lane Date: Mon, 15 Dec 2008 18:23:02 -0500 (EST) CC: valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1229383382-20708-1_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/5 X-Sequence-Number: 5012 --ELM1229383382-20708-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Tom Lane wrote: > [ redirecting to pgsql-docs ] > > Valentin Bogdanov writes: > >> From: dx k9 > >> I'm trying to understand what the documentation means > >> by bytes per increment, what is the increment supposed to > >> be bytes, MB, or Kb. > > > shared_buffers is in disk block size, typically 8K, at least that's what it is on Linux platforms. shmmax is quite simply in bytes. > > The table the OP is looking at (table 17.2 in the 8.3 docs) predates > the ability to specify shared_buffers in KB or MB instead of > number-of-buffers. I agree it's not entirely obvious that what it > means is "multiply your setting in KB/MB by 8400/8192". Anybody have > an idea how to clarify things? I have updated the table title to be clearer. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1229383382-20708-1_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: doc/src/sgml/runtime.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v retrieving revision 1.422 diff -c -c -r1.422 runtime.sgml *** doc/src/sgml/runtime.sgml 20 Nov 2008 11:48:26 -0000 1.422 --- doc/src/sgml/runtime.sgml 15 Dec 2008 23:22:24 -0000 *************** *** 1087,1093 **** Name ! Approximate multiplier (bytes per increment) as of 8.3 --- 1087,1093 ---- Name ! Additional bytes per object, as of 8.3 *************** *** 1119,1125 **** Fixed space requirements ! 770 kB --- 1119,1125 ---- Fixed space requirements ! 770 k --ELM1229383382-20708-1_-- From bruce@momjian.us Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2477C64FD4A; Mon, 15 Dec 2008 19:32:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76132-07; Mon, 15 Dec 2008 19:32:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 76EA464FCBE; Mon, 15 Dec 2008 19:32:36 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBFNWaa26314; Mon, 15 Dec 2008 18:32:36 -0500 (EST) From: Bruce Momjian Message-Id: <200812152332.mBFNWaa26314@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <3bd4182ebf79bc4a171f08d03d2edb2f@biglumber.com> To: Greg Sabino Mullane Date: Mon, 15 Dec 2008 18:32:36 -0500 (EST) CC: pgsql-docs@postgresql.org, pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/6 X-Sequence-Number: 5013 I have added this TODO item: Rationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count * http://archives.postgresql.org/pgsql-docs/2008-07/msg00007.php --------------------------------------------------------------------------- Greg Sabino Mullane wrote: [ There is text before PGP section. ] > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: RIPEMD160 > NotDashEscaped: You need GnuPG to verify this message > > > >> shared_buffers is in disk block size, typically 8K > > > The table the OP is looking at (table 17.2 in the 8.3 docs) predates > > the ability to specify shared_buffers in KB or MB instead of > > number-of-buffers. I agree it's not entirely obvious that what it > > means is "multiply your setting in KB/MB by 8400/8192". Anybody have > > an idea how to clarify things? > > Bite the bullet and start showing the buffer settings as a pure number of bytes > everywhere, and get rid of the confusing '8kB' unit in pg_settings? Things like > this don't help our cause: > > test=# show shared_buffers; > shared_buffers > ---------------- > 24MB > (1 row) > > test=# set temp_buffers = '24MB'; > SET > > test=# show temp_buffers; > temp_buffers > -------------- > 3072 > > test=# select name, setting from pg_settings where name ~ 'buffers'; > name | setting > ----------------+--------- > shared_buffers | 3072 > temp_buffers | 3072 > wal_buffers | 8 > > test=# show wal_buffers; > wal_buffers > ------------- > 64kB > > > -- > Greg Sabino Mullane greg@turnstep.com > End Point Corporation > PGP Key: 0x14964AC8 200807241351 > http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 > -----BEGIN PGP SIGNATURE----- > > iEYEAREDAAYFAkiIwYYACgkQvJuQZxSWSsiY5wCfU/tca+1JakWaMCDDRHEHk/Uj > 1rcAoMi1FNGSpJhyXWde1psygq6v3MlS > =gCPg > -----END PGP SIGNATURE----- > > > > -- > Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-docs -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + From alvherre@commandprompt.com Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 07CF764FD6D for ; Mon, 15 Dec 2008 19:43:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78242-03 for ; Mon, 15 Dec 2008 19:43:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id 0CE1E64FCBE for ; Mon, 15 Dec 2008 19:43:54 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-65-108.bk5-dsl.surnet.cl [200.126.65.108]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id mBFNmiRN028722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Dec 2008 15:48:47 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 7371647CCD; Mon, 15 Dec 2008 20:43:37 -0300 (CLST) Date: Mon, 15 Dec 2008 20:43:37 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax Message-ID: <20081215234337.GP4067@alvh.no-ip.org> References: <28167.1216737959@sss.pgh.pa.us> <200812152323.mBFNN3Y25121@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812152323.mBFNN3Y25121@momjian.us> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Mon, 15 Dec 2008 15:48:48 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/7 X-Sequence-Number: 5014 Bruce Momjian wrote: > Tom Lane wrote: > > [ redirecting to pgsql-docs ] > > > > Valentin Bogdanov writes: > > >> From: dx k9 > > >> I'm trying to understand what the documentation means > > >> by bytes per increment, what is the increment supposed to > > >> be bytes, MB, or Kb. > > > > > shared_buffers is in disk block size, typically 8K, at least that's what it is on Linux platforms. shmmax is quite simply in bytes. > > > > The table the OP is looking at (table 17.2 in the 8.3 docs) predates > > the ability to specify shared_buffers in KB or MB instead of > > number-of-buffers. I agree it's not entirely obvious that what it > > means is "multiply your setting in KB/MB by 8400/8192". Anybody have > > an idea how to clarify things? > > I have updated the table title to be clearer. I don't find it any clearer ... I think the missing clue is that if you specify shared_buffers values in MB, you must divide the value by block size. > *************** > *** 1119,1125 **** > > > Fixed space requirements > ! 770 kB > > > > --- 1119,1125 ---- > > > Fixed space requirements > ! 770 k > > > This change is wrong, why did you do it? -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support From bruce@momjian.us Wed Jun 3 03:48:05 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6E9FF64FD6F for ; Mon, 15 Dec 2008 19:46:05 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78723-04 for ; Mon, 15 Dec 2008 19:46:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 81EBA64FD6D for ; Mon, 15 Dec 2008 19:46:02 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBFNk0W28273; Mon, 15 Dec 2008 18:46:00 -0500 (EST) From: Bruce Momjian Message-Id: <200812152346.mBFNk0W28273@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <20081215234337.GP4067@alvh.no-ip.org> To: Alvaro Herrera Date: Mon, 15 Dec 2008 18:46:00 -0500 (EST) CC: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/8 X-Sequence-Number: 5015 Alvaro Herrera wrote: > Bruce Momjian wrote: > > Tom Lane wrote: > > > [ redirecting to pgsql-docs ] > > > > > > Valentin Bogdanov writes: > > > >> From: dx k9 > > > >> I'm trying to understand what the documentation means > > > >> by bytes per increment, what is the increment supposed to > > > >> be bytes, MB, or Kb. > > > > > > > shared_buffers is in disk block size, typically 8K, at least that's what it is on Linux platforms. shmmax is quite simply in bytes. > > > > > > The table the OP is looking at (table 17.2 in the 8.3 docs) predates > > > the ability to specify shared_buffers in KB or MB instead of > > > number-of-buffers. I agree it's not entirely obvious that what it > > > means is "multiply your setting in KB/MB by 8400/8192". Anybody have > > > an idea how to clarify things? > > > > I have updated the table title to be clearer. > > I don't find it any clearer ... I think the missing clue is that if you > specify shared_buffers values in MB, you must divide the value by block > size. Well, the heading says "object" now so I thought it would suggest we are talking about objects and not bytes. > > *************** > > *** 1119,1125 **** > > > > > > Fixed space requirements > > ! 770 kB > > > > > > > > --- 1119,1125 ---- > > > > > > Fixed space requirements > > ! 770 k > > > > > > > > This change is wrong, why did you do it? The heading says "bytes" so having the "B" was unnecessary and possibly confusing. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + From tgl@sss.pgh.pa.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D85C564FEE7 for ; Mon, 15 Dec 2008 20:35:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 88605-04 for ; Mon, 15 Dec 2008 20:35:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id C40BD64FEBF for ; Mon, 15 Dec 2008 20:35:44 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBG0ZcgM014938; Mon, 15 Dec 2008 19:35:38 -0500 (EST) To: Bruce Momjian cc: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax In-reply-to: <200812152346.mBFNk0W28273@momjian.us> References: <200812152346.mBFNk0W28273@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Mon, 15 Dec 2008 18:46:00 -0500" Date: Mon, 15 Dec 2008 19:35:38 -0500 Message-ID: <14937.1229387738@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/9 X-Sequence-Number: 5016 Bruce Momjian writes: > Alvaro Herrera wrote: >> I don't find it any clearer ... I think the missing clue is that if you >> specify shared_buffers values in MB, you must divide the value by block >> size. > Well, the heading says "object" now so I thought it would suggest we are > talking about objects and not bytes. I'm with Alvaro: neither of those changes were improvements. regards, tom lane From bruce@momjian.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2534065024B for ; Mon, 15 Dec 2008 23:13:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17646-09 for ; Mon, 15 Dec 2008 23:13:29 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 86C0B6501FF for ; Mon, 15 Dec 2008 23:13:29 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBG3DLH09968; Mon, 15 Dec 2008 22:13:21 -0500 (EST) From: Bruce Momjian Message-Id: <200812160313.mBG3DLH09968@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <14937.1229387738@sss.pgh.pa.us> To: Tom Lane Date: Mon, 15 Dec 2008 22:13:21 -0500 (EST) CC: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/11 X-Sequence-Number: 5018 Tom Lane wrote: > Bruce Momjian writes: > > Alvaro Herrera wrote: > >> I don't find it any clearer ... I think the missing clue is that if you > >> specify shared_buffers values in MB, you must divide the value by block > >> size. > > > Well, the heading says "object" now so I thought it would suggest we are > > talking about objects and not bytes. > > I'm with Alvaro: neither of those changes were improvements. OK, I never got the change applied because of Alvaro's objection so there is nothing to revert. Alvaro said he has an idea for improved wording; I do not. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + From alvherre@commandprompt.com Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4F68964FD7C for ; Tue, 16 Dec 2008 10:43:46 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 35163-08 for ; Tue, 16 Dec 2008 10:43:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id 4420664FD6F for ; Tue, 16 Dec 2008 10:43:40 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-65-108.bk5-dsl.surnet.cl [200.126.65.108]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id mBGEmZqi000442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Dec 2008 06:48:38 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 7FBEA47CCD; Tue, 16 Dec 2008 11:43:27 -0300 (CLST) Date: Tue, 16 Dec 2008 11:43:27 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax Message-ID: <20081216144327.GI4741@alvh.no-ip.org> References: <14937.1229387738@sss.pgh.pa.us> <200812160313.mBG3DLH09968@momjian.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: <200812160313.mBG3DLH09968@momjian.us> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 16 Dec 2008 06:48:39 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/12 X-Sequence-Number: 5019 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Bruce Momjian wrote: > OK, I never got the change applied because of Alvaro's objection so > there is nothing to revert. Alvaro said he has an idea for improved > wording; I do not. I think we should add a more explicit note, like in the attached patch. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. --IJpNTDwzlM2Ie8A6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="note-buffersize.patch" Index: runtime.sgml =================================================================== RCS file: /home/alvherre/Code/cvs/pgsql/doc/src/sgml/runtime.sgml,v retrieving revision 1.422 diff -c -p -r1.422 runtime.sgml *** runtime.sgml 20 Nov 2008 11:48:26 -0000 1.422 --- runtime.sgml 16 Dec 2008 14:40:42 -0000 *************** set semsys:seminfo_semmsl=32 *** 1124,1129 **** --- 1124,1139 ---- + + + + The multipliers for shared_buffers and + 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 and + , respectively. + + --IJpNTDwzlM2Ie8A6-- From alvherre@commandprompt.com Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BA28D64FC2D for ; Tue, 16 Dec 2008 15:33:30 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91488-02 for ; Tue, 16 Dec 2008 15:33:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id D28C964FC2A for ; Tue, 16 Dec 2008 15:33:26 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-65-108.bk5-dsl.surnet.cl [200.126.65.108]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id mBGJcM0O029263 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Dec 2008 11:38:25 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 8B3F547CCD; Tue, 16 Dec 2008 16:33:14 -0300 (CLST) Date: Tue, 16 Dec 2008 16:33:14 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax Message-ID: <20081216193314.GR4741@alvh.no-ip.org> References: <14937.1229387738@sss.pgh.pa.us> <200812160313.mBG3DLH09968@momjian.us> <20081216144327.GI4741@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081216144327.GI4741@alvh.no-ip.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 16 Dec 2008 11:38:25 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/16 X-Sequence-Number: 5023 Alvaro Herrera wrote: > Bruce Momjian wrote: > > > OK, I never got the change applied because of Alvaro's objection so > > there is nothing to revert. Alvaro said he has an idea for improved > > wording; I do not. > > I think we should add a more explicit note, like in the attached patch. Committed. Bruce told me on IM he still wants to do more changes. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. From bruce@momjian.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A2B8565025C for ; Tue, 16 Dec 2008 18:06:59 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 20469-04 for ; Tue, 16 Dec 2008 18:06:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id E59B16501CD for ; Tue, 16 Dec 2008 18:06:55 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBGM6rV19025; Tue, 16 Dec 2008 17:06:53 -0500 (EST) From: Bruce Momjian Message-Id: <200812162206.mBGM6rV19025@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <20081216193314.GR4741@alvh.no-ip.org> To: Alvaro Herrera Date: Tue, 16 Dec 2008 17:06:53 -0500 (EST) CC: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1229465212-5875-0_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/17 X-Sequence-Number: 5024 --ELM1229465212-5875-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Alvaro Herrera wrote: > Alvaro Herrera wrote: > > Bruce Momjian wrote: > > > > > OK, I never got the change applied because of Alvaro's objection so > > > there is nothing to revert. Alvaro said he has an idea for improved > > > wording; I do not. > > > > I think we should add a more explicit note, like in the attached patch. > > Committed. Bruce told me on IM he still wants to do more changes. > > -- > Alvaro Herrera http://www.CommandPrompt.com/ > The PostgreSQL Company - Command Prompt, Inc. OK, updated patch. I added item descriptions and removed Alvaro's paragraph; I worked with Alvaro on this patch. You can see the output in table 17-2: http://momjian.us/tmp/pgsql/kernel-resources.html -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1229465212-5875-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/pgpatches/shared_mem_table" 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 16 Dec 2008 22:01:14 -0000 *************** *** 1087,1141 **** Name ! Approximate multiplier (bytes per increment) as of 8.3 ! 1800 + 270 * ! 1800 + 270 * ! 770 + 270 * ! 8400 (assuming 8 kB BLCKSZ) ! 8200 (assuming 8 kB XLOG_BLCKSZ) Fixed space requirements ! 770 kB ! ! ! The multipliers for shared_buffers and ! 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 and ! , respectively. ! ! ! ! Resource Limits --- 1087,1137 ---- Name ! Shared memory requirements, as of 8.3 ! 1800 + 270 * bytes per connection ! 1800 + 270 * bytes per worker ! 770 + 270 * bytes per prepared transaction ! + 208 bytes per shared buffer ! + 8 bytes per WAL buffer Fixed space requirements ! 770k bytes ! ! These shared memory allocations are reserved at database server ! start and remain static. ! Resource Limits --ELM1229465212-5875-0_-- From tgl@sss.pgh.pa.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 530136501B3 for ; Tue, 16 Dec 2008 19:38:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34056-01 for ; Tue, 16 Dec 2008 19:38:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id C8F6C6501CD for ; Tue, 16 Dec 2008 19:38:23 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBGNcHc6017529; Tue, 16 Dec 2008 18:38:17 -0500 (EST) To: Bruce Momjian cc: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax In-reply-to: <200812162206.mBGM6rV19025@momjian.us> References: <200812162206.mBGM6rV19025@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 16 Dec 2008 17:06:53 -0500" Date: Tue, 16 Dec 2008 18:38:17 -0500 Message-ID: <17528.1229470697@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/18 X-Sequence-Number: 5025 Bruce Momjian 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 > > > > ! 1800 + 270 * ! linkend="guc-max-locks-per-transaction"> bytes per connection > 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 From bruce@momjian.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D876464FE35 for ; Tue, 16 Dec 2008 21:33:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53946-03 for ; Tue, 16 Dec 2008 21:33:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id EE1F464FD14 for ; Tue, 16 Dec 2008 21:33:38 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBH1Xac23918; Tue, 16 Dec 2008 20:33:36 -0500 (EST) From: Bruce Momjian Message-Id: <200812170133.mBH1Xac23918@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <17528.1229470697@sss.pgh.pa.us> To: Tom Lane Date: Tue, 16 Dec 2008 20:33:36 -0500 (EST) CC: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1229477616-5875-1_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/19 X-Sequence-Number: 5026 --ELM1229477616-5875-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Tom Lane wrote: > Bruce Momjian 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 > > > > > > > > > ! 1800 + 270 * > ! linkend="guc-max-locks-per-transaction"> bytes per connection > > > > 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 http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1229477616-5875-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/pgpatches/shared_mem_table" 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 **** Name ! Approximate multiplier (bytes per increment) as of 8.3 ! ! 1800 + 270 * ! ! ! ! ! 1800 + 270 * ! 770 + 270 * ! 8400 (assuming 8 kB BLCKSZ) ! 8200 (assuming 8 kB XLOG_BLCKSZ) Fixed space requirements ! 770 kB ! ! ! The multipliers for shared_buffers and ! 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 and ! , respectively. ! ! ! ! Resource Limits --- 1087,1132 ---- Name ! Shared memory bytes required, as of 8.3 ! , ! (1800 + 270 * ) * ( + ) ! (770 + 270 * ) * ! ( + 208) * ! ( + 8) * Fixed space requirements ! 770k bytes ! ! These shared memory allocations are reserved at database server ! start and remain static. ! Resource Limits --ELM1229477616-5875-1_-- From tgl@sss.pgh.pa.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id CCB5B64FCB2 for ; Tue, 16 Dec 2008 23:31:25 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75109-07 for ; Tue, 16 Dec 2008 23:31:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1867F64FD09 for ; Tue, 16 Dec 2008 23:31:22 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBH3VFaP020539; Tue, 16 Dec 2008 22:31:15 -0500 (EST) To: Bruce Momjian cc: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax In-reply-to: <200812170133.mBH1Xac23918@momjian.us> References: <200812170133.mBH1Xac23918@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 16 Dec 2008 20:33:36 -0500" Date: Tue, 16 Dec 2008 22:31:15 -0500 Message-ID: <20538.1229484675@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/20 X-Sequence-Number: 5027 Bruce Momjian writes: > Tom Lane wrote: >> If you're going to give a formula, why not just give a formula, eg > You mean like this: > http://momjian.us/tmp/pgsql/kernel-resources.html Yeah, more or less. A couple thoughts now that I see it worked out: * Combining the entries for max_connections and autovacuum_max_workers is probably just making it look more complicated than it needs to. How about two rows that just happen to have similar formulas, viz max_connections (1800 + 270 * max_locks_per_transaction) * max_connections autovacuum_max_workers (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers * The right-hand column header should be something like "Approximate shared memory bytes..." to avoid the impression that these formulas are meant to be exact. * If we do it like this then the left-hand column is really redundant, not to say wrong because the right-hand formulas depend on more than the single variable mentioned. How about something like Table 17-2 PostgreSQL shared memory usage Purpose Approximate number of bytes required (as of 8.3) Per-connection state (1800 + 270 * max_locks_per_transaction) * max_connections Autovacuum worker state (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers Prepared transaction state ... Shared disk buffers ... WAL buffers ... Fixed space requirements 770kB regards, tom lane From bruce@momjian.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6FA3564FEB3 for ; Wed, 17 Dec 2008 09:41:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76280-01 for ; Wed, 17 Dec 2008 09:41:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 5457964FE31 for ; Wed, 17 Dec 2008 09:41:45 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBHDfeK11281; Wed, 17 Dec 2008 08:41:40 -0500 (EST) From: Bruce Momjian Message-Id: <200812171341.mBHDfeK11281@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <20538.1229484675@sss.pgh.pa.us> To: Tom Lane Date: Wed, 17 Dec 2008 08:41:40 -0500 (EST) CC: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/21 X-Sequence-Number: 5028 Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> If you're going to give a formula, why not just give a formula, eg > > > You mean like this: > > http://momjian.us/tmp/pgsql/kernel-resources.html > > Yeah, more or less. A couple thoughts now that I see it worked out: > > * Combining the entries for max_connections and autovacuum_max_workers > is probably just making it look more complicated than it needs to. > How about two rows that just happen to have similar formulas, viz > > max_connections (1800 + 270 * max_locks_per_transaction) * max_connections > autovacuum_max_workers (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers > > * The right-hand column header should be something like "Approximate > shared memory bytes..." to avoid the impression that these formulas > are meant to be exact. > > * If we do it like this then the left-hand column is really redundant, > not to say wrong because the right-hand formulas depend on more than > the single variable mentioned. How about something like > > Table 17-2 PostgreSQL shared memory usage > > Purpose Approximate number of bytes required (as of 8.3) > > Per-connection state (1800 + 270 * max_locks_per_transaction) * max_connections > Autovacuum worker state (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers > Prepared transaction state ... > Shared disk buffers ... > WAL buffers ... > Fixed space requirements 770kB OK, I updated it again: http://momjian.us/tmp/pgsql/kernel-resources.html I did change your left column wording because it could be interpreted as something that changes during server execution, e.g. connections. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + From tgl@sss.pgh.pa.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 182A664FDBB for ; Wed, 17 Dec 2008 09:53:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78294-09 for ; Wed, 17 Dec 2008 09:53:52 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 818FA64FD73 for ; Wed, 17 Dec 2008 09:53:51 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBHDriWe027842; Wed, 17 Dec 2008 08:53:44 -0500 (EST) To: Bruce Momjian cc: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax In-reply-to: <200812171341.mBHDfeK11281@momjian.us> References: <200812171341.mBHDfeK11281@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Wed, 17 Dec 2008 08:41:40 -0500" Date: Wed, 17 Dec 2008 08:53:44 -0500 Message-ID: <27841.1229522024@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/22 X-Sequence-Number: 5029 Bruce Momjian writes: > Tom Lane wrote: >> * If we do it like this then the left-hand column is really redundant, >> not to say wrong because the right-hand formulas depend on more than >> the single variable mentioned. How about something like >> >> Table 17-2 PostgreSQL shared memory usage >> >> Purpose Approximate number of bytes required (as of 8.3) >> >> Per-connection state (1800 + 270 * max_locks_per_transaction) * max_connections >> Autovacuum worker state (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers >> Prepared transaction state ... >> Shared disk buffers ... >> WAL buffers ... >> Fixed space requirements 770kB > OK, I updated it again: > http://momjian.us/tmp/pgsql/kernel-resources.html > I did change your left column wording because it could be interpreted as > something that changes during server execution, e.g. connections. [ shrug... ] I don't find what you did to be an improvement over what I suggested, but I don't have time to argue about it. regards, tom lane From bruce@momjian.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 662596500E7 for ; Wed, 17 Dec 2008 10:11:31 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 82466-02 for ; Wed, 17 Dec 2008 10:11:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id D0FA664FE31 for ; Wed, 17 Dec 2008 10:11:24 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBHEBKX26736; Wed, 17 Dec 2008 09:11:20 -0500 (EST) From: Bruce Momjian Message-Id: <200812171411.mBHEBKX26736@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <27841.1229522024@sss.pgh.pa.us> To: Tom Lane Date: Wed, 17 Dec 2008 09:11:20 -0500 (EST) CC: Alvaro Herrera , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/23 X-Sequence-Number: 5030 Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> * If we do it like this then the left-hand column is really redundant, > >> not to say wrong because the right-hand formulas depend on more than > >> the single variable mentioned. How about something like > >> > >> Table 17-2 PostgreSQL shared memory usage > >> > >> Purpose Approximate number of bytes required (as of 8.3) > >> > >> Per-connection state (1800 + 270 * max_locks_per_transaction) * max_connections > >> Autovacuum worker state (1800 + 270 * max_locks_per_transaction) * autovacuum_max_workers > >> Prepared transaction state ... > >> Shared disk buffers ... > >> WAL buffers ... > >> Fixed space requirements 770kB > > > OK, I updated it again: > > > http://momjian.us/tmp/pgsql/kernel-resources.html > > > I did change your left column wording because it could be interpreted as > > something that changes during server execution, e.g. connections. > > [ shrug... ] I don't find what you did to be an improvement over what > I suggested, but I don't have time to argue about it. I decided I didn't like what I did either; updated version with new headings and shorter descriptions: http://momjian.us/tmp/pgsql/kernel-resources.html -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + From alvherre@commandprompt.com Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 124E9650218 for ; Wed, 17 Dec 2008 11:21:06 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95012-01-7 for ; Wed, 17 Dec 2008 11:21:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id 38D4164FFD8 for ; Wed, 17 Dec 2008 11:20:52 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-65-108.bk5-dsl.surnet.cl [200.126.65.108]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id mBHFPliV026930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Dec 2008 07:25:50 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id AE99F47CCD; Wed, 17 Dec 2008 12:20:38 -0300 (CLST) Date: Wed, 17 Dec 2008 12:20:38 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax Message-ID: <20081217152038.GB4453@alvh.no-ip.org> References: <27841.1229522024@sss.pgh.pa.us> <200812171411.mBHEBKX26736@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812171411.mBHEBKX26736@momjian.us> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 17 Dec 2008 07:25:51 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/24 X-Sequence-Number: 5031 Bruce Momjian wrote: > I decided I didn't like what I did either; updated version with new > headings and shorter descriptions: > > http://momjian.us/tmp/pgsql/kernel-resources.html This version seems good to me, except please put back the B to the end of "770 k". -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support From bruce@momjian.us Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D4F6264FCE9 for ; Thu, 18 Dec 2008 13:07:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 72073-06 for ; Thu, 18 Dec 2008 13:07:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id EB75964FCE3 for ; Thu, 18 Dec 2008 13:07:23 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id mBIH7KA01987; Thu, 18 Dec 2008 12:07:20 -0500 (EST) From: Bruce Momjian Message-Id: <200812181707.mBIH7KA01987@momjian.us> Subject: Re: [ADMIN] shared_buffers and shmmax In-Reply-To: <20081217152038.GB4453@alvh.no-ip.org> To: Alvaro Herrera Date: Thu, 18 Dec 2008 12:07:20 -0500 (EST) CC: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1229620039-5875-2_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/26 X-Sequence-Number: 5033 --ELM1229620039-5875-2_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Alvaro Herrera wrote: > Bruce Momjian wrote: > > > I decided I didn't like what I did either; updated version with new > > headings and shorter descriptions: > > > > http://momjian.us/tmp/pgsql/kernel-resources.html > > This version seems good to me, except please put back the B to the end > of "770 k". Patch applied with "B" re-added, though I would like to mention again that it is inconsistent because we don't mention bytes in any other row in that column. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1229620039-5875-2_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: runtime.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v retrieving revision 1.423 retrieving revision 1.424 diff -c -c -r1.423 -r1.424 *** runtime.sgml 16 Dec 2008 19:30:43 -0000 1.423 --- runtime.sgml 18 Dec 2008 17:03:09 -0000 1.424 *************** *** 1,4 **** ! Operating System Environment --- 1,4 ---- ! Operating System Environment *************** *** 1080,1120 **** ! Configuration parameters affecting ! <productname>PostgreSQL</productname>'s shared memory usage</> <tgroup cols="2"> <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> --- 1080,1124 ---- <table id="shared-memory-parameters"> ! <title><productname>PostgreSQL</productname> shared memory usage</> <tgroup cols="2"> <thead> <row> ! <entry>Usage</> ! <entry>Approximate shared memory bytes required (as of 8.3)</> </row> </thead> <tbody> <row> ! <entry>Connections</> ! <entry>(1800 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * <xref ! linkend="guc-max-connections"></entry> </row> <row> ! <entry>Autovacuum workers</> ! <entry>(1800 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * <xref ! linkend="guc-autovacuum-max-workers"></entry> </row> <row> ! <entry>Prepared transactions</> ! <entry>(770 + 270 * <xref ! linkend="guc-max-locks-per-transaction">) * <xref linkend="guc-max-prepared-transactions"></entry> </row> <row> ! <entry>Shared disk buffers</> ! <entry>(<xref linkend="guc-block-size"> + 208) * <xref linkend="guc-shared-buffers"></entry> </row> <row> ! <entry>WAL buffers</> ! <entry>(<xref linkend="guc-wal-block-size"> + 8) * <xref linkend="guc-wal-buffers"></entry> </row> <row> *************** *** 1125,1142 **** </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 --- 1129,1136 ---- --ELM1229620039-5875-2_-- From alvherre@commandprompt.com Wed Jun 3 03:48:06 2026 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 97AC064FCE9 for ; Thu, 18 Dec 2008 13:10:21 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 72302-09 for ; Thu, 18 Dec 2008 13:10:16 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id C690864FCE3 for ; Thu, 18 Dec 2008 13:10:15 -0400 (AST) Received: from perhan.alvh.no-ip.org (190-95-20-42.bk17-dsl.surnet.cl [190.95.20.42]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id mBIHFDkQ007195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Dec 2008 09:15:16 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 103B647CCD; Thu, 18 Dec 2008 14:10:03 -0300 (CLST) Date: Thu, 18 Dec 2008 14:10:03 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Tom Lane , valiouk@yahoo.co.uk, pgsql-docs@postgresql.org, dx k9 Subject: Re: [ADMIN] shared_buffers and shmmax Message-ID: <20081218171002.GH5447@alvh.no-ip.org> References: <20081217152038.GB4453@alvh.no-ip.org> <200812181707.mBIH7KA01987@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812181707.mBIH7KA01987@momjian.us> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Thu, 18 Dec 2008 09:15:16 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/27 X-Sequence-Number: 5034 Bruce Momjian wrote: > Alvaro Herrera wrote: > > This version seems good to me, except please put back the B to the end > > of "770 k". > > Patch applied with "B" re-added, though I would like to mention again > that it is inconsistent because we don't mention bytes in any other row > in that column. The heading already says "bytes". -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.