Postgres processes have a burst of CPU usage

From: Subramaniam Aiylam <aiylam_s(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Postgres processes have a burst of CPU usage
Date: 2007-01-22 22:52:43
Message-ID: 321168.15595.qm@web60712.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

Hello all,

I have a setup in which four client machines access
a Postgres database (8.1.1) (on a Linux box). So,
there are connections from each machine to the
database; hence, the Linux box has about 2 postgres
processes associated with each machine.

I am using the JDBC driver
(postgresql-8.1-404.jdbc3.jar) to talk to the
database. I am also using the Spring framework(1.2.2)
and Hibernate (3.0.5) on top of JDBC. I use Apache's
DBCP database connection pool (1.2.1).

Now, there is one particular update that I make from
one of the client machines - this involves a
reasonably large object graph (from the Java point of
view). It deletes a bunch of rows (around 20 rows in
all) in 4-5 tables and inserts another bunch into the
same tables.

When I do this, I see a big spike in the CPU usage
of postgres processes that are associated with ALL the
client machines, not just the one I executed the
delete/insert operation on. The spike seems to happen
a second or two AFTER the original update completes
and last for a few seconds.

Is it that this operation is forcibly clearing some
client cache on ALL the postgres processes? Why is
there such an interdependency? Can I set some
parameter to turn this off?

Regards and thanks,
S.Aiylam


____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and
previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121


____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2007-01-22 22:55:07 Re: Installing Postegres side-by-side with M$ SQL
Previous Message Brandon Aiken 2007-01-22 22:46:09 Re: Trouble creating database with proper encoding

Browse pgsql-jdbc by date

  From Date Subject
Next Message Marc 2007-01-23 05:26:00 Applet Connectivity - PLEASE help
Previous Message Do, Leon (Leon) 2007-01-22 20:54:26 Re: Max size for bytea type