pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Chittenden <sean@chittenden.org>
To: Aaron Krowne <akrowne@vt.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgresql meltdown on PlanetMath.org
Date: Sun, 16 Mar 2003 00:20:24 -0800
Message-ID: <20030316082024.GA66903@perrin.int.nxad.com> (raw)
In-Reply-To: <20030316080601.GF19570@vt.edu>
References: <20030316060125.GD19570@vt.edu>
	<20030316061208.GA62529@perrin.int.nxad.com>
	<20030316080601.GF19570@vt.edu>

> > > - Lastly, I tried reducing the shared memory max and limiting postgresql
> > >   to more conservative values, although still not to the out-of-box
> > >   values.  Right now shared memory max on the system is 128mb,
> > >   postgres's shared buffers are at 64mb, sort_mem is at 16mb, and
> > >   effective cache size is at 10mb.
> > *) You shouldn't have to do this either.
> 
> Well, I've now been advised that the best way is all 3 that I have
> tried (among aggressive buffering, moderate buffering, and default
> conservative buffering).
>
> Perhaps you could explain to me why the system shouldn't be ok with
> the moderate set of buffer sizes on a 512mb machine?  I don't really
> know enough about the internals of postgres to be doing anything but
> voodoo when I change the values.

Honestly?  The defaults are small, but they're not small enough to
give you the lousy performance you were describing.  If your buffers
are too high or there are enough things that are using up KVM/system
memory... contention can cause thashing/swapping which it wasn't clear
that you weren't having happen.  Defaults shouldn't, under any
non-embedded circumstance cause problems with machines >233Mhz,
they're just too conservative to do any harm.  :)

> > *) Have you done a vacuum analyze?
> 
> See previous message to list (summary: it worked this time, but
> usually it does not help.)

Hrmm... ENOTFREEBSD, eh?

http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/postgresql7/files/502.pgsql?rev=1.5&conten...

You may want to setup a nightly vacuum/backup procedure.  Palle
Girgensohn <girgen@pingpong.net> has written a really nice and simple
script that's been in use for ages on FreeBSD PostgreSQL installations
for making sure that you don't have this problem.

Actually, it'd be really cool to lobby to get this script added to the
base PostgreSQL installation that way you wouldn't have this
problem... it'd also dramatically increase the number of nightly
backups performed for folks if a default script does this along with
vacuuming.  -sc


-- 
Sean Chittenden



view thread (39+ messages)  latest in thread

Message-ID: <20030316082024.GA66903@perrin.int.nxad.com>
Permalink:  ../20030316082024.GA66903@perrin.int.nxad.com/
Also on:    postgresql.org/message-id/20030316082024.GA66903@perrin.int.nxad.com

 · 

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: sean@chittenden.org, akrowne@vt.edu
  Subject: Re: postgresql meltdown on PlanetMath.org
  In-Reply-To: <20030316082024.GA66903@perrin.int.nxad.com>
  References: <20030316060125.GD19570@vt.edu> <20030316061208.GA62529@perrin.int.nxad.com> <20030316080601.GF19570@vt.edu> <20030316082024.GA66903@perrin.int.nxad.com>

* 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