From: Cyrille Bonnet <cyrille@3months.com>
To: pgsql-performance@postgresql.org
Subject: very high CPU usage in "top", but not in "mpstat"
Date: Wed, 5 May 2004 11:34:41 +1200
Message-ID: <47E18B2A3472@3months.com> (raw)
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.
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: cyrille@3months.com
Subject: Re: very high CPU usage in "top", but not in "mpstat"
In-Reply-To: <47E18B2A3472@3months.com>
* 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