Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0620B632ACD for ; Mon, 2 Nov 2009 12:14:55 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 07263-08 for ; Mon, 2 Nov 2009 16:14:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f193.google.com (mail-pz0-f193.google.com [209.85.222.193]) by mail.postgresql.org (Postfix) with ESMTP id 8C8056334D2 for ; Mon, 2 Nov 2009 12:14:46 -0400 (AST) Received: by pzk31 with SMTP id 31so3440048pzk.28 for ; Mon, 02 Nov 2009 08:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Gl6nOzvZhY4zfNA5LXNgsMXZGL4JNLeXvTVKUstA0Xs=; b=FI9/KYNbrzP2YhC4IgZ+RnknnWTZ+plJ/Y+4SrzhQMsNExN/UplEM7J962cdLrpcOp rG/kb8nfI9JydoccVHG55F9BaBhqH+4lsJQ4Bij4pRC2Q2fCrzBUECpKZxThx02I0wiJ +XSQ7T/y+50mgU+sCkQ/0bd0D/eLZyb8YZrZU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=bqn/iZcVG9bZ0JpD1Pz4gbrfn5N/JnTwTTwtr4Jz7TC6lYgm8iHHFCzUBzOGwvFp5h MIwhXOeVKfltfpE+/TSihJIMdBoE88u6eWp3fAqlevdynO7esqZyDwdgFc2yAs6X0cP9 w/+Mr8/slDLG1ESwzzJMmauqOKxneZhVZ1HgA= MIME-Version: 1.0 Received: by 10.141.23.5 with SMTP id a5mr322576rvj.108.1257178484776; Mon, 02 Nov 2009 08:14:44 -0800 (PST) In-Reply-To: <20091102125054.GA25608@pme.intranet.prolan.hu> References: <20091029144405.GA3755@pme.intranet.prolan.hu> <20091102125054.GA25608@pme.intranet.prolan.hu> Date: Mon, 2 Nov 2009 08:14:44 -0800 Message-ID: Subject: Re: database size growing continously From: Anj Adu To: Peter Meszaros Cc: Scott Marlowe , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/14 X-Sequence-Number: 36182 I would recommend (if at all possible) to partition the table and drop the old partitions when not needed. This will guarantee the space free-up without VACUUM overhead. Deletes will kill you at some point and you dont want too much of the VACUUM IO overhead impacting your performance. On Mon, Nov 2, 2009 at 4:50 AM, Peter Meszaros wrote: > Thank you all for the fast responses! > > I changed the delete's schedule from daily to hourly and I will let you > know the result. This seems to be the most promising step. > > The next one is tuning 'max_fsm_pages'. > Increasing max_fsm_pages can be also helpful, but I've read that > 'vacuum verbose ...' will issue warnings if max_fsm_pages is too small. > I've never seen such messag, this command is either run and finish or > goes to an endless loop as it was written in my initial e-mail. > > > On Thu, Oct 29, 2009 at 10:59:48AM -0600, Scott Marlowe wrote: >> On Thu, Oct 29, 2009 at 8:44 AM, Peter Meszaros wrote: >> > Hi All, >> > >> > I use postgresql 8.3.7 as a huge queue. There is a very simple table >> > with six columns and two indices, and about 6 million records are >> > written into it in every day continously commited every 10 seconds fro= m >> > 8 clients. The table stores approximately 120 million records, because= a >> > cron job daily deletes those ones are older than 20 day. Autovacuum is >> > on and every settings is the factory default except some unrelated one= s >> > (listen address, authorization). But my database is growing, >> > characteristically ~600MByte/day, but sometimes much slower (eg. 10MB, >> > or even 0!!!). >> >> Sounds like you're blowing out your free space map. =A0Things to try: >> >> 1: delete your rows in smaller batches. =A0Like every hour delete >> everything over 20 days so you don't delete them all at once one time >> a day. >> 2: crank up max fsm pages large enough to hold all the dead tuples. >> 3: lower the autovacuum cost delay >> 4: get faster hard drives so that vacuum can keep up without causing >> your system to slow to a crawl while vacuum is running. > > -- > E-mail: pmeATprolanDOThu > Phone: +36-20-954-3100/8139 > Mobile: +36-20-9543139 > Fax: +36-26-540420 > http://www.prolan.hu > Mon Nov =A02 13:20:39 CET 2009 > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org= ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance >