X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 66FB3D1CA43 for ; Tue, 4 May 2004 20:35:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98685-01 for ; Tue, 4 May 2004 20:34:51 -0300 (ADT) Received: from 3months.com (unknown [203.96.25.18]) by svr1.postgresql.org (Postfix) with ESMTP id BF0C9D1EB44 for ; Tue, 4 May 2004 20:34:47 -0300 (ADT) Received: from Spooler by 3months.com (Mercury/32 v4.01a) ID MO00020B; 5 May 2004 11:31:29 +1200 Received: from spooler by 3months.com (Mercury/32 v4.01a); 5 May 2004 11:31:24 +1200 Received: from Cyrillelaptop (203.96.25.15) by 3months.com (Mercury/32 v4.01a) with ESMTP ID MG00004F; 5 May 2004 11:31:21 +1200 From: "Cyrille Bonnet" To: Subject: very high CPU usage in "top", but not in "mpstat" Date: Wed, 5 May 2004 11:34:41 +1200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0018_01C43294.F4B6B620" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcQyMF9N3R0vP6P2T4aKHdZRNbaNdg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: <47E18B2A3472@3months.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=HTML_60_70, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200405/31 X-Sequence-Number: 6862 This is a multi-part message in MIME format. ------=_NextPart_000_0018_01C43294.F4B6B620 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hello all, We are using Postgres 7.3 with JBoss 3.2.3 on a Linux Fedora 1.0 box. When I am looking at CPU activity with "top", I often see something like: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 14154 postgres 25 0 3592 3592 2924 R 99.1 0.3 93:53 0 postmaster At the same time, "mpstat" gives me something like: 11:27:21 AM CPU %user %nice %system %idle intr/s 11:27:21 AM all 2.99 0.00 18.94 78.08 105.94 The system is not visibly slow and response time is satisfactory. Sometimes, the CPU usage drops to 1 or 2%, but not for long usually. Also I have checked the number of open connections to Postgres and there are only 5 (maximum is set to the default: 32). Should I be worried that Postgres is eating up 99% of my CPU??? Or is this *expected* behaviour? Please note that I am a developer, not a system administrator, so maybe I misunderstand the usage of "top" here. Any help will be appreciated. Cyrille. ------=_NextPart_000_0018_01C43294.F4B6B620 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Hello all,

 

We are using Postgres 7.3 with JBoss 3.2.3 on a Linux Fe= dora 1.0 box.

 

When I am looking at CPU activity with “top”= , I often see something like:

 

  PID USER     PRI  NI&nbs= p; SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND=

14154 postgres  25   0  3592 3592&nb= sp; 2924        R    99.1&nbs= p;     0.3        93:53   0 postmaster

 

At the same time, “mpstat” gives me something like:

 

11:27:21 AM  CPU   %user   %nice %system   %idle    intr/s=

11:27:21 AM  all      &nbs= p;2.99      0.00   18.94       &nbs= p; 78.08    105.94

 

The system is not visibly slow and response time is satisfactory. Sometimes, the CPU usage drops to 1 or 2%, but not for long usually. Also I have checked the number of open connections to Postgres and there are only 5 (maximum is set to the default: 32).

 

Should I be worried that Postgres is eating up 99% of my CPU??? Or is this *expected* behaviour?

 

Please note that I am a developer, not a system administrator, so maybe I misunderstand the usage of “top” here= .

 

Any help will be appreciated.

 

Cyrille.

------=_NextPart_000_0018_01C43294.F4B6B620--