X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 10B8953879 for ; Fri, 22 Apr 2005 13:30:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88129-03 for ; Fri, 22 Apr 2005 16:29:56 +0000 (GMT) Received: from orthus.host4u.net (orthus.host4u.net [209.150.128.160]) by svr1.postgresql.org (Postfix) with ESMTP id 82392537EB for ; Fri, 22 Apr 2005 13:29:55 -0300 (ADT) Received: from [192.168.1.100] (69-175-234-81.vnnyca.adelphia.net [69.175.234.81]) by orthus.host4u.net (8.11.6/8.11.6) with ESMTP id j3MGTif30012; Fri, 22 Apr 2005 11:29:54 -0500 In-Reply-To: <4574.1114030270@sss.pgh.pa.us> References: <6f4567d4e64297b356e2d71ec392cdae@richardplotkin.com> <4574.1114030270@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9c5b2bf6a0f5a0bc0abeb6b6c5cf7973@richardplotkin.com> Content-Transfer-Encoding: 7bit Cc: pgsql-performance@postgresql.org From: Richard Plotkin Subject: Re: Disk filling, CPU filling, renegade inserts and deletes? Date: Fri, 22 Apr 2005 09:29:39 -0700 To: Tom Lane X-Mailer: Apple Mail (2.622) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/616 X-Sequence-Number: 12013 I've also now tried looking at pg_class.relpages. I compared the results before and after vacuum. The results stayed the same, except for five rows that increased after the vacuum. Here is the select on those rows after the vacuum: relname | relnamespace | reltype | relowner | relam | relfilenode | reltablespace | relpages | reltuples | reltoastrelid | reltoastidxid | relhasindex | relisshared | relkind | relnatts | relchecks | reltriggers | relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules | relhassubclass | relacl ---------------------------------+--------------+---------+---------- +-------+-------------+---------------+----------+----------- +---------------+---------------+-------------+-------------+--------- +----------+-----------+-------------+----------+----------+--------- +------------+------------+-------------+---------------- +--------------- pg_attribute_relid_attnam_index | 11 | 0 | 1 | 403 | 16686 | 0 | 292 | 10250 | 0 | 0 | f | f | i | 2 | 0 | 0 | 0 | 0 | 0 | f | f | f | f | pg_class_oid_index | 11 | 0 | 1 | 403 | 16690 | 0 | 18 | 2640 | 0 | 0 | f | f | i | 1 | 0 | 0 | 0 | 0 | 0 | f | f | f | f | pg_depend_depender_index | 11 | 0 | 1 | 403 | 16701 | 0 | 52 | 6442 | 0 | 0 | f | f | i | 3 | 0 | 0 | 0 | 0 | 0 | f | f | f | f | pg_type_oid_index | 11 | 0 | 1 | 403 | 16731 | 0 | 8 | 1061 | 0 | 0 | f | f | i | 1 | 0 | 0 | 0 | 0 | 0 | f | f | f | f | pg_depend | 11 | 16677 | 1 | 0 | 16676 | 0 | 32 | 4200 | 0 | 0 | t | f | r | 7 | 0 | 0 | 0 | 0 | 0 | f | f | f | f | {=r/postgres} On Apr 20, 2005, at 1:51 PM, Tom Lane wrote: > Richard Plotkin writes: >> I'm having a pretty serious problem with postgresql's performance. >> Currently, I have a cron task that is set to restart and vacuumdb -faz >> every six hours. If that doesn't happen, the disk goes from 10% full >> to 95% full within 2 days (and it's a 90GB disk...with the database >> being a 2MB download after dump), and the CPU goes from running at >> around a 2% load to a 99+% load right away (the stats look like a >> square wave). > > Q: what have you got the FSM parameters set to? > > Q: what exactly is bloating? Without knowing which tables or indexes > are growing, it's hard to speculate about the exact causes. Use du and > oid2name, or look at pg_class.relpages after a plain VACUUM. > > It's likely that the real answer is "you need to vacuum more often > than every six hours", but I'm trying not to jump to conclusions. > > regards, tom lane > > ---------------------------(end of > broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >