Skip site navigation (1) Skip section navigation (2)

Re: Postgres processes have a burst of CPU usage

From: Richard Huxton <dev(at)archonet(dot)com>
To: Subramaniam Aiylam <aiylam_s(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres processes have a burst of CPU usage
Date: 2007-01-24 08:49:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
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

In response to

pgsql-performance by date

Next:From: Richard HuxtonDate: 2007-01-24 08:54:05
Subject: Re: Auto Vacuum Problem
Previous:From: Gauri KanekarDate: 2007-01-24 08:49:06
Subject: Auto Vacuum Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group