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 CE2FAD1C7EF for ; Tue, 5 Aug 2003 12:33:45 +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 05748-05 for ; Tue, 5 Aug 2003 09:32:30 -0300 (ADT) Received: from smtp.pspl.co.in (unknown [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id E4597D1C4B7 for ; Tue, 5 Aug 2003 09:33:33 -0300 (ADT) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id h75CXpar015954 for ; Tue, 5 Aug 2003 18:03:51 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) (authenticated bits=0) by persistent.co.in (8.12.9/8.12.9) with ESMTP id h75CXoip015940 for ; Tue, 5 Aug 2003 18:03:51 +0530 From: "Shridhar Daithankar" To: pgsql-performance@postgresql.org Date: Tue, 05 Aug 2003 18:05:26 +0530 MIME-Version: 1.0 Subject: Re: Some vacuum & tuning help Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3F2FF1E6.10579.651E89@localhost> In-reply-to: X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/56 X-Sequence-Number: 2873 On 5 Aug 2003 at 8:09, Jeff wrote: > I've been trying to search through the archives, but it hasn't been > successful. > > We recently upgraded from pg7.0.2 to 7.3.4 and things were happy. I'm > trying to fine tune things to get it running a bit better and I'm trying > to figure out how vacuum output correlates to tuning parameters. > > Here's the msot recent vacuum for the "active" table. It gets a few > hundred updates/inserts a minute constantly throughout the day. I would suggest autovacuum daemon which is in CVS contrib works for 7.3.x as well.. Or schedule a vacuum analyze every 15 minutes or so.. > > INFO: Pages 27781: Changed 0, Empty 0; Tup 2451648: Vac 0, Keep 0, UnUsed > 1003361. > Total CPU 2.18s/0.61u sec elapsed 2.78 sec. > > I see unused is quite high. This morning I bumped max_fsm_pages to 500000. > If I'm thinking right you want unused and max_fsm to be closish, right? > (Yesterday it was down around.. oh.. 600k?) > > I'm thinking vacuum full's may be in order. Which stinks because I was > hoping to do away with the db essentially down for 10 minutes (includes > all the db's on that machine) while it vacuum'd. I think vacuum full is required. > The upside is: it is performing great. During the vacuum analyze I do get > a few multi-second pauses while something occurs. I figured it was a > checkpoint, so I bumped checkpoint_timeout to 30 seconds and wal_buffers > to 128. (I'm just guessing on wal_buffers). If it is couple of tables that are that heavily killed, I would suggest to a pg_dump, drop table and reload table. That should take less time. Your downtime might not be 10 minutes but more like 15 say. That's a rough estimate.. > > Machine is weenucks 2.2.17 on a dual p3 800, 2gb ram, 18gb drive (mirrored). You mean linux? I guess you need a kernel revision for a long time. How about 2.4.21? > If you guys need other info (shared_buffers, etc) I'll be happy to funish > them. but the issue isn't query slowness.. just want to get this thing > oiled). See if this helps.. Bye Shridhar -- QOTD: "I thought I saw a unicorn on the way over, but it was just a horse with one of the horns broken off."