From: John Siracusa <siracusa@mindspring.com>
To: Postgres Performance <pgsql-performance@postgresql.org>
Subject: Idle postmaster taking up a lot of CPU
Date: Sat, 17 Jan 2004 10:34:22 -0500
Message-ID: <BC2EC02E.24F93%siracusa@mindspring.com> (raw)
Here's the top item from the "top" listing on my Postgres machine:
10:20am up 98 days, 18:28, 3 users, load average: 1.14, 1.09, 0.85
103 processes: 101 sleeping, 1 running, 0 zombie, 1 stopped
CPU0 states: 38.0% user, 13.1% system, 0.0% nice, 48.3% idle
CPU1 states: 39.0% user, 11.3% system, 0.0% nice, 49.1% idle
Mem: 1033384K av, 1021972K used, 11412K free, 0K shrd, 42772K buff
Swap: 1185080K av, 17012K used, 1168068K free 748736K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
20753 postgres 17 0 40292 39M 35960 S 60.9 3.8 26:54 postmaster
Process 20753 was hovering around 60-70% CPU usage for a long time.
I tried to see what that postmaster was doing, but it appeared to be "idle"
% ps -wwwx -p 20753
PID TTY STAT TIME COMMAND
20753 pts/3 R 26:59 postgres: postgres pdm 192.168.0.35 idle
192.168.0.35 is one of our web servers. I restarted the web server (thus
ending all db connections from that machine) and the "idle-but-CPU-hogging"
postmaster went away. I'm still concerned about exactly what it was doing,
however. Any ideas? Any suggestions for further debugging the situation if
it happens again?
Also, a second question while I'm here :) Ignoring that one CPU-hogging
postmaster, does the header information in that "top" listing look
reasonable in terms of memory usage? The "free" memory always hovers around
11412K, but "buff" and "cache" are usually huge. I'm assuming "buff" and
"cache" memory is available if any of the processes needs it, but there is
always some small amount of swap in use anyway. Should I be concerned, or
does this look okay?
-John
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: siracusa@mindspring.com
Subject: Re: Idle postmaster taking up a lot of CPU
In-Reply-To: <BC2EC02E.24F93%siracusa@mindspring.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