pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Subramaniam Aiylam <aiylam_s@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres processes have a burst of CPU usage
Date: Wed, 24 Jan 2007 08:49:28 +0000
Message-ID: <45B71D98.5080805@archonet.com> (raw)
In-Reply-To: <519784.22637.qm@web60714.mail.yahoo.com>
References: <519784.22637.qm@web60714.mail.yahoo.com>

Subramaniam Aiylam wrote:
>   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.

So what are the other backends doing? They're not going to be using CPU 
cycles for nothing, they must be executing queries. Perhaps turn on 
statement logging, and track process IDs.

I can't think of any PostgreSQL caching that would be seriously affected 
by updating a few dozen rows. It might be that one of your java 
libraries is clearing its cache though, causing it to issue more queries.

-- 
   Richard Huxton
   Archonet Ltd



view thread (2+ messages)

Message-ID: <45B71D98.5080805@archonet.com>
Permalink:  ../45B71D98.5080805@archonet.com/
Also on:    postgresql.org/message-id/45B71D98.5080805@archonet.com

 · 

reply

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: dev@archonet.com, aiylam_s@yahoo.com
  Subject: Re: Postgres processes have a burst of CPU usage
  In-Reply-To: <45B71D98.5080805@archonet.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