X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 55982D1B53A for ; Fri, 5 Sep 2003 21:59:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 32279-07 for ; Fri, 5 Sep 2003 18:58:40 -0300 (ADT) Received: from MX2.estpak.ee (mta1.mail.neti.ee [194.126.101.123]) by svr1.postgresql.org (Postfix) with ESMTP id 23967D1B8A4 for ; Fri, 5 Sep 2003 18:58:39 -0300 (ADT) Received: from neti.ee (virtual.estpak.ee [194.126.101.112]) by MX2.estpak.ee (Postfix) with SMTP id 68C1173595 for ; Sat, 6 Sep 2003 00:56:35 +0300 (EEST) Date: Fri, 5 Sep 2003 21:58:29 -0000 To: Subject: Serious issues with CPU usage From: X-Mailer: TWIG neti.ee X-Client-IP: 213.219.85.42 Message-Id: <20030905215635.68C1173595@MX2.estpak.ee> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/109 X-Sequence-Number: 3475 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 , 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.