postmaster has high CPU (system) utilization

From: Trevor Bylsma <tbylsma(at)atreus-systems(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: postmaster has high CPU (system) utilization
Date: 2003-03-17 23:10:14
Message-ID: 1047942615.17591.416.camel@trevor
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using postgreSQL and perl DBI and have come across this issue:

postmaster will use most of the CPU for an extended amount of time
(which isn't odd) but 75% of that is system level (which seems odd)...

<-- snippit from top -->
4:45pm up 17 days, 22:22, 5 users, load average: 0.71, 0.29, 0.19
84 processes: 69 sleeping, 15 running, 0 zombie, 0 stopped
CPU states: 25.6% user, 74.3% system, 0.0% nice, 0.0% idle
Mem: 257136K av, 241656K used, 15480K free, 147956K shrd, 55740K
buff
Swap: 514072K av, 136K used, 513936K free 42724K
cached

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME
COMMAND
19906 postgres 11 0 4552 4552 3792 R 0 87.3
1.7 0:55 postmaster
<-- end of snippit -->

What I am doing is, via a perl script, reading about 5000 records out of
the database and printing them to the screen. This process takes about
5 minutes with postmaster hogging the CPU for the duration.

What is odd is that if I then duplicate the same data on another box and
run the same script there the process takes less then 30 seconds to
complete. Postmaster will still hog the CPU, but it is 75% user level
load, rather than system level like it is on the problematic box. (Yes,
the 2 boxes are of equivalent horsepower and have the same version of
linux, postgreSQL, and perl installed)

I should also mention that if I run the same query within psql I will
get all the results in about 4 seconds.

Has anybody else run into this problem where postmaster seems to churn
in system level calls?? Any ideas on how to fix this issue ?

Thanks in advance,
Trevor.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Douglas Trainor 2003-03-17 23:33:01 Re: Tomcat/Struts/Pooling?/Memory Sizes
Previous Message Tom Lane 2003-03-17 22:56:05 Re: Catalogs about sequences