pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Foster <martin@ethereal-realms.org>
To: Sean Chittenden <sean@chittenden.org>
To: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Moving postgresql.conf tunables into 2003...
Date: Wed, 09 Jul 2003 18:23:44 -0600
Message-ID: <3F0CB210.60309@ethereal-realms.org> (raw)
In-Reply-To: <20030709233031.GF72567@perrin.int.nxad.com>
References: <20030703190502.GR72567@perrin.int.nxad.com>
	<CJEBLDCHAADCLAGIGCOOCECPCLAA.michael.mattox@verideon.com>
	<20030709233031.GF72567@perrin.int.nxad.com>

Sean Chittenden wrote:
> 
> I looked through the src/doc/runtime.sgml for a good place to stick
> this and couldn't find a place that this seemed appropriate, but on
> FreeBSD, this can be determined with a great deal of precision in a
> programmatic manner:
> 
> echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
> 
> The same OID is available via C too.  It'd be slick if PostgreSQL
> could tune itself (on FreeBSD) at initdb time with the above code.  If
> Linux exports this info via /proc and can whip out the appropriate
> magic, even better.  An uncommented out good guess that shows up in
> postgresql.conf would be stellar and quite possible with the use of
> sed.
> 
> Maybe an initdb switch could be added to have initdb tune the config
> it generates?  If a -n is added, have it generate a config and toss it
> to stdout?
> 
> 
> case `uname` in
> "FreeBSD")
>         echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
>         ;;
> *)
>         echo "Unable to automatically determine the effective cache size" >> /dev/stderr
>         ;;
> esac
> 
> 
> -sc
> 

Simplest way may be to create a 'auto-tune' directory with scripts for 
configured platforms.   When postgres installs the databases, it checks 
for 'tune.xxx' and if found uses that to generate the script itself?

This would allow for defaults on platforms that do not have them and 
optimization for those that do.

	Martin Foster
	Creator/Designer Ethereal Realms
	martin@ethereal-realms.org





view thread (45+ messages)  latest in thread

Message-ID: <3F0CB210.60309@ethereal-realms.org>
Permalink:  ../3F0CB210.60309@ethereal-realms.org/
Also on:    postgresql.org/message-id/3F0CB210.60309@ethereal-realms.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: martin@ethereal-realms.org, sean@chittenden.org
  Subject: Re: Moving postgresql.conf tunables into 2003...
  In-Reply-To: <3F0CB210.60309@ethereal-realms.org>
  References: <20030703190502.GR72567@perrin.int.nxad.com> <CJEBLDCHAADCLAGIGCOOCECPCLAA.michael.mattox@verideon.com> <20030709233031.GF72567@perrin.int.nxad.com> <3F0CB210.60309@ethereal-realms.org>

* 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