pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Petrilli <petrilli@gmail.com>
To: jd@commandprompt.com
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Marc G. Fournier <scrappy@postgresql.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Sustained inserts per sec ... ?
Date: Fri, 1 Apr 2005 15:59:52 -0500
Message-ID: <59d991c4050401125956d6069d@mail.gmail.com> (raw)
In-Reply-To: <1112388818.3487.34.camel@jd2.commandprompt.com>
References: <20050401140421.P18194@ganymede.hub.org>
	<59d991c4050401113857086517@mail.gmail.com>
	<28353.1112388128@sss.pgh.pa.us>
	<59d991c4050401124638c4ab5d@mail.gmail.com>
	<1112388818.3487.34.camel@jd2.commandprompt.com>

On Apr 1, 2005 3:53 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
> 
> > What seems to happen is it slams into a "wall" of some sort, the
> > system goes into disk write frenzy (wait=90% CPU), and eventually
> > recovers and starts running for a while at a more normal speed.  What
> > I need though, is to not have that wall happen.  It is easier for me
> > to accept a constant degredation of 5%, rather than a 99% degredation
> > for short periods, as it can cause cascade problems in the system.
> 
> Could this possibly be a checkpoint happening?
> 
> Also how many checkpoint segments do you have?

Changes to the postgresql.conf file from "default":

    maintenance_work_mem = 131072
    fsync = false
    checkpoint_segments = 32

I set the checkpoint segments up until it no longer complained about
them rolling over.  That was the best "advice" I could find online. 
The maintenance_work_mem I upped to deal with indexes being updated
constantly.  And finally, since I'm willing to risk some loss, I
turned fsync off, since the system is on a UPS (or will be in
production) and carefully monitored.

I did actually wonder about the checkpoint_segments being an issue,
since it seems to me the more of them you have, the more you'd have to
deal with when checkpointing, and so you might actually want to turn
that number down to create a "smoother" behavior.

Unfortunately, the alot advice for 'loading data' doesn't apply when
you have a constant stream of load, rather than just sporadic.  Any
advice is more than appreciated.

Chris
-- 
| Christopher Petrilli
| petrilli@gmail.com



view thread (44+ messages)  latest in thread

Message-ID: <59d991c4050401125956d6069d@mail.gmail.com>
Permalink:  ../59d991c4050401125956d6069d@mail.gmail.com/
Also on:    postgresql.org/message-id/59d991c4050401125956d6069d@mail.gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: petrilli@gmail.com, jd@commandprompt.com, tgl@sss.pgh.pa.us, scrappy@postgresql.org
  Subject: Re: Sustained inserts per sec ... ?
  In-Reply-To: <59d991c4050401125956d6069d@mail.gmail.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