pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: andris@neti.ee
To: pgsql-performance@postgresql.org
Subject: Serious issues with CPU usage
Date: Fri, 5 Sep 2003 21:58:29 -0000
Message-ID: <20030905215635.68C1173595@MX2.estpak.ee> (raw)

Hi,

i'm having _serious_ issues of postgres hogging up the CPU over time. A graph
showing this can be seen at http://andri.estpak.ee/cpu0.png .

The database is running on Redhat 9 (stock 2.4.20-8 kernel), on a reiserfs
partition (~8% usage - no problem there), and this problem has been with
PostgreSQL 7.3.2 (both package provided by Redhat and self-rebuilt package)
and 7.3.4 (i used the 7.3.4 SRPM available at postgres ftp site).

A VACUUM FULL is a remedy to this problem, but a simple VACUUM isn't. 

This can be reproduced, I think, by a simple UPDATE command:

database=# EXPLAIN ANALYZE UPDATE table SET random_int_field = 1, last_updated
= NOW() WHERE primary_key = 3772;
                                                           QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------
 Index Scan using table_pkey on table  (cost=0.00..6.81 rows=1 width=83)
(actual time=0.09..0.10 rows=1 loops=1)
   Index Cond: (primary_key = 3772)
 Total runtime: 0.37 msec

When I repeat this command using simple <up><enter>, I can see the "Total
runtime" time grow ever so slightly - creeping from 0.37 to 0.38, then 0.39
etc.   Would probably get higher if I had the patience. :)

The table "table" used in this example has 2721 rows, so size isn't an issue here.

Any comments or suggestions are welcome. If more information is needed, let me
know and I'll post the needed details.



view thread (9+ messages)  latest in thread

Message-ID: <20030905215635.68C1173595@MX2.estpak.ee>
Permalink:  ../20030905215635.68C1173595@MX2.estpak.ee/
Also on:    postgresql.org/message-id/20030905215635.68C1173595@MX2.estpak.ee

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: andris@neti.ee
  Subject: Re: Serious issues with CPU usage
  In-Reply-To: <20030905215635.68C1173595@MX2.estpak.ee>
  References: <20030905215635.68C1173595@MX2.estpak.ee>

* 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