pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Foster <martin@ethereal-realms.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: PostgreSQL Novice <pgsql-novice@postgresql.org>
To: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: [PERFORM] Extreme high load averages
Date: Sun, 06 Jul 2003 14:28:48 -0600
Message-ID: <3F088680.5070109@ethereal-realms.org> (raw)
In-Reply-To: <9918.1057504765@sss.pgh.pa.us>
References: <3F07ABA1.2070100@ethereal-realms.org>
	<200307060849.00544.dev@archonet.com>
	<3F07FA98.70009@ethereal-realms.org>
	<9918.1057504765@sss.pgh.pa.us>

Tom Lane wrote:

> Martin Foster <martin@ethereal-realms.org> writes:
> 
>>>The only time that I have ever seen load averages of 30 or more under
>>>OpenBSD is when one of my scripts goes wild.
> 
> 
> Note also that "high load average" is not per se an indication that
> anything is wrong.  In Postgres, if you have thirty queries waiting
> for disk I/O, that's thirty processes --- so if that's the average
> state then the kernel will report a load average of thirty.  While
> I'm no MySQL expert, I believe that the equivalent condition in MySQL
> would be thirty threads blocked for I/O within one process.  Depending
> on how your kernel is written, that might show as a load average of
> one ... but the difference is completely illusory, because what counts
> is the number of disk I/Os in flight, and that's the same.
> 
> You didn't say whether you were seeing any real performance problems,
> like slow queries or performance dropping when query load rises, but
> that is the aspect to concentrate on.
> 
> I concur with the nearby recommendations to drop your resource settings.
> The thing you have to keep in mind about Postgres is that it likes to
> have a lot of physical RAM available for kernel disk buffers (disk
> cache).  In a correctly tuned system that's been up for any length of
> time, "free memory" should be nearly nada, and the amount of RAM used
> for disk buffers should be sizable (50% or more of RAM would be good
> IMHO).
> 
> 			regards, tom lane

Under a circumstance where we have 250 concurrent users, MySQL would 
report an uptime of 0.5 sometimes 0.8 depending on the tasks being 
performed.

This would translate to wait times averaging less then a second, and 
under a heavy resource script 4 seconds.    That system had less RAM 
however.

This new system when showing a load average of 30, produced wait times 
of 12 seconds averages and about 30 seconds for the heavy resource 
script.     The web server itself showed a load average of 0.5 showing 
that it was not heavy client interaction slowing things down.

So there is a very noticeable loss of performance when the system 
skyrockets like that.   All of the load as indicated by top is at user 
level, and not swap is even touched.

This may help show why I was slightly concerned.

	Martin Foster
	Creator/Designer Ethereal Realms
	martin@ethereal-realms.org





view thread (22+ messages)  latest in thread

Message-ID: <3F088680.5070109@ethereal-realms.org>
Permalink:  ../3F088680.5070109@ethereal-realms.org/
Also on:    postgresql.org/message-id/3F088680.5070109@ethereal-realms.org

 · 

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: martin@ethereal-realms.org, tgl@sss.pgh.pa.us, pgsql-novice@postgresql.org
  Subject: Re: [PERFORM] Extreme high load averages
  In-Reply-To: <3F088680.5070109@ethereal-realms.org>
  References: <3F07ABA1.2070100@ethereal-realms.org> <200307060849.00544.dev@archonet.com> <3F07FA98.70009@ethereal-realms.org> <9918.1057504765@sss.pgh.pa.us> <3F088680.5070109@ethereal-realms.org>

* 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