pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: andy rost <andy.rost@noaa.gov>
Cc: pgsql-performance@postgresql.org
Cc: bill.sites@noaa.gov
Subject: Re: Opteron/FreeBSD/PostgreSQL performance poor
Date: Thu, 6 Jul 2006 10:44:26 -0400
Message-ID: <b42b73150607060744u54a6ea93la0e56da3828e0a13@mail.gmail.com> (raw)
In-Reply-To: <44ABCFF4.3010007@noaa.gov>
References: <44ABCFF4.3010007@noaa.gov>

On 7/5/06, andy rost <andy.rost@noaa.gov> wrote:

> fsync = on                              # turns forced synchronization

have you tried turning this off and measuring performance?

> stats_command_string = on

I would turn this off unless you absoltely require it.  It is
expensive for what it does.

> a) All 4 CPUs are nearly always 0% idle;
> b) The system load level is nearly always in excess of 20;

I am guessing your system is spending all it's time syncing.  If so,
it's solvable (again, just run fsync=off for a bit and compare).

> c) the output from vmstat -w 10 looks like:
>   procs      memory      page                    disks     faults      cpu
>   r b w     avm    fre  flt  re  pi  po  fr  sr aa0 aa1   in   sy  cs us
> sy id
> 21 0 3 1242976 327936 2766   0   0   0 2264   0   2   2 17397 140332
> 104846 18 82  1

is that 100k context switches over 10 seconds or one second? that
might be something to check out.  pg 8.1 is regarded as the solution
to any cs problem, though.

> NOTE - small user demands and high system demands
> d) Running top indicates a significant number or sblock states and
> occasional smwai states;
> e) ps auxww | grep postgres doesn't show anything abnormal;
> f) ESQL applications are very slow.
>
> We VACUUM ANALYZE user databases every four hours. We VACUUM template1
> every 4 hours. We make a copy of the current WAL every minute. We create
> a PIT recovery archive daily daily. None of these, individually seem to
> place much strain on the server.

your server should be able to handle this easily.

> Hopefully I've supplied enough information to start diagnosing the
> problem. Any ideas, thoughts, suggestions are greatly appreciated ...
>

can you please approximate roughly how many transactions per second
your server is handling while you are getting the 20 load condition
(and, if possible, broken down into read and write transactions)?

merlin



view thread (10+ messages)  latest in thread

Message-ID: <b42b73150607060744u54a6ea93la0e56da3828e0a13@mail.gmail.com>
Permalink:  ../b42b73150607060744u54a6ea93la0e56da3828e0a13@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73150607060744u54a6ea93la0e56da3828e0a13@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 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: mmoncure@gmail.com, andy.rost@noaa.gov, bill.sites@noaa.gov
  Subject: Re: Opteron/FreeBSD/PostgreSQL performance poor
  In-Reply-To: <b42b73150607060744u54a6ea93la0e56da3828e0a13@mail.gmail.com>
  References: <44ABCFF4.3010007@noaa.gov> <b42b73150607060744u54a6ea93la0e56da3828e0a13@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