pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgresql meltdown on PlanetMath.org
Date: Fri, 21 Mar 2003 01:18:32 -0500
Message-ID: <10490.1048227512@sss.pgh.pa.us> (raw)
In-Reply-To: <87fzphk5hd.fsf@Login.CERT.Uni-Stuttgart.DE>
References: <20030316060125.GD19570@vt.edu>
	<3E741B93.1090203@joeconway.com>
	<20030316075206.GE19570@vt.edu>
	<Pine.LNX.4.53.0303170059580.8767@neo.magick.org>
	<20030317061011.GH23355@perrin.int.nxad.com>
	<33137.130.15.224.150.1047881939.squirrel@mailbox.samurai.com>
	<495.1047882860@sss.pgh.pa.us>
	<Pine.LNX.4.53.0303171845190.8636@neo.magick.org>
	<15804.1047955909@sss.pgh.pa.us>
	<87fzphk5hd.fsf@Login.CERT.Uni-Stuttgart.DE>

Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> writes:
> Hmm, are there any guidelines for choosing these values?

> We have a database with a table into which we insert about 4,000,000
> rows each day, and delete another 4,000,000 rows.  The total row count
> is around 40 million, I guess, and the rows are about 150 bytes long.

If you are replacing 10% of the rows in the table every day, then it's
a pretty good bet that every single page of the table contains free
space.  Accordingly, you'd better set max_fsm_pages large enough to
have a FSM slot for every page of the table.  (1 page = 8Kb normally)

You could possibly get away with a smaller FSM if you do (non-FULL)
vacuums more often than once a day.  Some people find they can run
background vacuums without hurting performance too much, some don't
--- I suspect it depends on how much spare disk bandwidth you have.

			regards, tom lane



view thread (39+ messages)

Message-ID: <10490.1048227512@sss.pgh.pa.us>
Permalink:  ../10490.1048227512@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10490.1048227512@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, Weimer@CERT.Uni-Stuttgart.DE
  Subject: Re: postgresql meltdown on PlanetMath.org
  In-Reply-To: <10490.1048227512@sss.pgh.pa.us>
  References: <20030316060125.GD19570@vt.edu> <3E741B93.1090203@joeconway.com> <20030316075206.GE19570@vt.edu> <Pine.LNX.4.53.0303170059580.8767@neo.magick.org> <20030317061011.GH23355@perrin.int.nxad.com> <33137.130.15.224.150.1047881939.squirrel@mailbox.samurai.com> <495.1047882860@sss.pgh.pa.us> <Pine.LNX.4.53.0303171845190.8636@neo.magick.org> <15804.1047955909@sss.pgh.pa.us> <87fzphk5hd.fsf@Login.CERT.Uni-Stuttgart.DE> <10490.1048227512@sss.pgh.pa.us>

* 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