X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D4A109DC883 for ; Thu, 16 Mar 2006 11:20:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28482-07 for ; Thu, 16 Mar 2006 11:20:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 00C6D9DC869 for ; Thu, 16 Mar 2006 11:20:14 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k2GFK9PU016634; Thu, 16 Mar 2006 10:20:09 -0500 (EST) To: "Guillaume Smet" cc: "Sven Geisler" , "Richard Huxton" , pgsql-performance@postgresql.org Subject: Re: PostgreSQL and Xeon MP 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> Comments: In-reply-to "Guillaume Smet" message dated "Thu, 16 Mar 2006 15:30:07 +0100" Date: Thu, 16 Mar 2006 10:20:09 -0500 Message-ID: <16633.1142522409@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200603/239 X-Sequence-Number: 17676 "Guillaume Smet" 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