Re: [ADMIN] shared_buffers and shmmax

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, valiouk(at)yahoo(dot)co(dot)uk, pgsql-docs(at)postgresql(dot)org, dx k9 <bitsandbytes88(at)hotmail(dot)com>
Subject: Re: [ADMIN] shared_buffers and shmmax
Date: 2008-12-17 03:31:15
Message-ID: 20538.1229484675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-docs pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Monnerie 2008-12-17 09:10:52 Re: reindexdb dying with SIGPIPE on 8.2.5
Previous Message Bruce Momjian 2008-12-17 01:33:36 Re: [ADMIN] shared_buffers and shmmax

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2008-12-17 13:41:40 Re: [ADMIN] shared_buffers and shmmax
Previous Message Bruce Momjian 2008-12-17 01:33:36 Re: [ADMIN] shared_buffers and shmmax

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2008-12-17 03:43:53 Re: Variadic parameters vs parameter defaults
Previous Message Gregory Stark 2008-12-17 03:26:32 Re: Looking for someone with MinGW