Re: Sustained inserts per sec ... ?

From: Christopher Petrilli <petrilli(at)gmail(dot)com>
To: jd(at)commandprompt(dot)com
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Sustained inserts per sec ... ?
Date: 2005-04-01 20:59:52
Message-ID: 59d991c4050401125956d6069d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Apr 1, 2005 3:53 PM, Joshua D. Drake <jd(at)commandprompt(dot)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(at)gmail(dot)com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-04-01 21:03:37 Re: Sustained inserts per sec ... ?
Previous Message Tom Lane 2005-04-01 20:58:45 Re: Sustained inserts per sec ... ?