pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guillaume Smet <guillaume.smet@gmail.com>
Cc: Sven Geisler <sgeisler@aeccom.com>
Cc: Richard Huxton <dev@archonet.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL and Xeon MP
Date: Thu, 16 Mar 2006 10:20:09 -0500
Message-ID: <16633.1142522409@sss.pgh.pa.us> (raw)
In-Reply-To: <1d4e0c10603160630g7fe945ffo1d723843407ed128@mail.gmail.com>
References: <1d4e0c10603160245n55128e86t35431a339afcf8cc@mail.gmail.com>
	<44194A4B.3020106@archonet.com>
	<1d4e0c10603160428s1a3c1f4cocbe8489634524387@mail.gmail.com>
	<441963F4.1010607@aeccom.com>
	<1d4e0c10603160630g7fe945ffo1d723843407ed128@mail.gmail.com>

"Guillaume Smet" <guillaume.smet@gmail.com> writes:
> Here is a top output I had on november 17 when the server completely
> hangs (several minutes for each page of the website) and it is typical
> of this server behaviour:
> 17:08:41  up 19 days, 15:16,  1 user,  load average: 4.03, 4.26, 4.36
> 288 processes: 285 sleeping, 3 running, 0 zombie, 0 stopped
> CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
>            total   59.0%    0.0%    8.8%   0.2%     0.0%    0.0%   31.9%
>            cpu00   52.3%    0.0%   13.3%   0.9%     0.0%    0.0%   33.3%
>            cpu01   65.7%    0.0%    7.6%   0.0%     0.0%    0.0%   26.6%
>            cpu02   58.0%    0.0%    7.6%   0.0%     0.0%    0.0%   34.2%
>            cpu03   60.0%    0.0%    6.6%   0.0%     0.0%    0.0%   33.3%
> Mem:  3857224k av, 3495880k used,  361344k free,       0k shrd,   92160k buff
>                    2374048k actv,  463576k in_d,   37708k in_c
> Swap: 4281272k av,   25412k used, 4255860k free                 2173392k cached

> As you can see, load is blocked to 4, no iowait and cpu idle of 30%.

Can you try strace'ing some of the backend processes while the system is
behaving like this?  I suspect what you'll find is a whole lot of
delaying select() calls due to high contention for spinlocks ...

			regards, tom lane



view thread (17+ messages)  latest in thread

Message-ID: <16633.1142522409@sss.pgh.pa.us>
Permalink:  ../16633.1142522409@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16633.1142522409@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, guillaume.smet@gmail.com, sgeisler@aeccom.com, dev@archonet.com
  Subject: Re: PostgreSQL and Xeon MP
  In-Reply-To: <16633.1142522409@sss.pgh.pa.us>

* 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