pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeffrey W. Baker <jwbaker@acm.org>
To: Robert Creager <Robert_Creager@logicalchaos.org>
Cc: PGPerformance <pgsql-performance@postgresql.org>
Cc: Andy Hewitt <Andy_Hewitt@StorageTek.com>
Subject: Re: Huge performance problem between 7.4.1 and 8.0.3 -
Date: Sun, 17 Jul 2005 22:09:11 -0700
Message-ID: <1121663351.10108.1.camel@noodles> (raw)
In-Reply-To: <20050717213416.59dcb52e@thunder.logicalchaos.org>
References: <20050717213416.59dcb52e@thunder.logicalchaos.org>

On Sun, 2005-07-17 at 21:34 -0600, Robert Creager wrote:
> Sigh...
> 
> I recently upgraded from 7.4.1 to 8.0.3.  The application did not change.  I'm
> now running both database concurrently (on different ports, same machine) just
> so I could verify the problem really exists.
> 
> The application is a custom test application for testing mechanical systems. 
> The runs in question (4 at a time) each generate 16 queries at a time of which
> the results are sent to the mechanical system which processes the request, which
> processes them anywhere from 10 to 120 seconds.  The system is capable of
> completing between 4 and 8 jobs at once.  So, once the system is running, at
> most there will be 8 queries per run simultaneously.
> 
> The entire database fits into RAM (2Gb), as evidenced by no disk activity and
> relatively small database size.  pg_xlog is on different disks from the db.
> 
> The problem is that on version 8.0.3, once I get 3 or more concurrent runs
> going, the query times start tanking (>20 seconds).  On 7.4.1, the applications
> hum along with queries typically below .2 seconds on over 5 concurrent runs. 
> Needless to say, 7.4.1 behaves as expected...  The only change between runs is
> the port connecting to.  Bot DB's are up at the same time.
> 
> For 8.03, pg_autovacuum is running.  On 7.4.1, I set up a cron job to vacuum
> analyze every 5 minutes.
> 
> The system is Mandrake Linux running 2.4.22 kernel with dual Intel Xenon CPU
> with HT enabled.  On an 803 run, the context switching is up around 60k.  On
> 7.4.1, it maxes around 23k and averages < 1k.

Did you build 8.0.3 yourself, or install it from packages?  I've seen in
the past where pg would build with the wrong kind of mutexes on some
machines, and that would send the CS through the roof.  If you did build
it yourself, check your ./configure logs.  If not, try strace.

-jwb



view thread (30+ messages)  latest in thread

Message-ID: <1121663351.10108.1.camel@noodles>
Permalink:  ../1121663351.10108.1.camel@noodles/
Also on:    postgresql.org/message-id/1121663351.10108.1.camel@noodles

 · 

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: jwbaker@acm.org, Robert_Creager@logicalchaos.org, Andy_Hewitt@StorageTek.com
  Subject: Re: Huge performance problem between 7.4.1 and 8.0.3 -
  In-Reply-To: <1121663351.10108.1.camel@noodles>

* 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