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 2A220D1B52C for ; Sat, 6 Sep 2003 00:05:21 +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 41110-03 for ; Fri, 5 Sep 2003 21:05:11 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id DA690D1B89D for ; Fri, 5 Sep 2003 21:05:08 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h86050An028676; Fri, 5 Sep 2003 20:05:00 -0400 (EDT) To: andris@neti.ee Cc: pgsql-performance@postgresql.org Subject: Re: Serious issues with CPU usage In-reply-to: <20030905215635.68C1173595@MX2.estpak.ee> References: <20030905215635.68C1173595@MX2.estpak.ee> Comments: In-reply-to message dated "Fri, 05 Sep 2003 21:58:29 -0000" Date: Fri, 05 Sep 2003 20:05:00 -0400 Message-ID: <28675.1062806700@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/110 X-Sequence-Number: 3476 writes: > 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 . You really haven't shown us anything that would explain that graph ... repeated UPDATEs will slow down a little until you vacuum, but not by the ratio you seem to be indicating. At least not if they're indexscans. If you've also got sequential-scan queries, and you're doing many zillion updates between vacuums, the answer is to vacuum more often. A decent rule of thumb is to vacuum whenever you've updated more than about 10% of the rows in a table since your last vacuum. > A VACUUM FULL is a remedy to this problem, but a simple VACUUM isn't. I find that odd; maybe there's something else going on here. But you've not given enough details to speculate. regards, tom lane