From geoffparkernews@yahoo.ca Tue Aug 8 01:27:47 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B10309FB381 for ; Mon, 7 Aug 2006 22:27:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 46280-05 for ; Tue, 8 Aug 2006 01:27:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from web57211.mail.re3.yahoo.com (web57211.mail.re3.yahoo.com [216.252.111.227]) by postgresql.org (Postfix) with SMTP id 95B459FB22B for ; Mon, 7 Aug 2006 22:27:38 -0300 (ADT) Received: (qmail 20617 invoked by uid 60001); 8 Aug 2006 01:27:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=o34aoWgjbR2bjW2ZBa5YMjFobav4UYIo3VnG/rCG5iGdzqCm1giQUMToV8ZIrZ18nhH5ncKyvmq/tL2AJGUp7dgnushyDtGvwCj+2tygPHWJElWC6tDxEYZPW3dxVVEeO3IQ0PzYfzi82oaLAQbUrJ35Gl6V+kwIRi7y40vnjp0= ; Message-ID: <20060808012736.20614.qmail@web57211.mail.re3.yahoo.com> Received: from [203.144.27.9] by web57211.mail.re3.yahoo.com via HTTP; Mon, 07 Aug 2006 18:27:36 PDT Date: Mon, 7 Aug 2006 18:27:36 -0700 (PDT) From: Geoff Parker Reply-To: Geoff Parker Subject: disk usage spike To: pgsql admin MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1653046801-1155000456=:18097" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200608/80 X-Sequence-Number: 22624 --0-1653046801-1155000456=:18097 Content-Type: text/plain; charset=us-ascii I have a database with about 155GB of binary data in large objects and 15GB of data in other tables. In compressed form, it consumes about 60GB on disk. On friday, the amount of disk usage increased to 240GB (over a period of 5 minutes), stayed at 240GB for 2 days, and then returned to 60GB (again over a period of about 5 minutes). What would cause such a spike in disk usage? And why would it stay at such a high level for 2 days? This is postgresql 8.1.4 on a slightly modified RHEL4 system (2.6.17 kernel). At the time the spike occurred (about 2pm), I may have been running some simple queries against various tables to determine usage statistics (eg, how many rows in table a, sum of column b in table c, etc (maximum of 100,000 rows in the tables, <10 columns), no nasty joins or anything). Also, I may have extracted a couple of large objects in full (not more than 200MB). Otherwise, the database processes a few (< 20) small (< 1k data) inserts/updates/deletes per minute. This would have been the only traffic to the database after friday afternoon when I went home. Autovacuum is turned on and the system had finished importing a large amount of data (50GB) earlier (4am) that morning. Is it possible the spike was caused by autovacuum re-indexing the pg_largeobject table? Thanks, Geoff. --0-1653046801-1155000456=:18097 Content-Type: text/html; charset=us-ascii
I have a database with about 155GB of binary data in large objects and 15GB of data in other tables.  In compressed form, it consumes about 60GB on disk.  On friday, the amount of disk usage increased to 240GB (over a period of 5 minutes), stayed at 240GB for 2 days, and then returned to 60GB (again over a period of about 5 minutes).

What would cause such a spike in disk usage? And why would it stay at such a high level for 2 days? 

This is postgresql 8.1.4 on a slightly modified RHEL4 system (2.6.17 kernel).

At the time the spike occurred (about 2pm), I may have been running some simple queries against various tables to determine usage statistics (eg, how many rows in table a, sum of column b in table c, etc (maximum of 100,000 rows in the tables,  <10 columns), no nasty joins or anything).  Also, I may have extracted a couple of large objects in full (not more than 200MB). 

Otherwise, the database processes a few (< 20) small (< 1k data) inserts/updates/deletes per minute.  This would have been the only traffic to the database after friday afternoon when I went home.

Autovacuum is turned on and the system had finished importing a large amount of data (50GB) earlier (4am) that morning.    Is it possible the spike was caused by autovacuum re-indexing the pg_largeobject table?

Thanks,
Geoff.




--0-1653046801-1155000456=:18097-- From tgl@sss.pgh.pa.us Tue Aug 8 02:12:55 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A06E79F9B55 for ; Mon, 7 Aug 2006 23:12:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 20268-10 for ; Mon, 7 Aug 2006 23:12:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 712E99FB28D for ; Mon, 7 Aug 2006 23:12:46 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k782CihH024610; Mon, 7 Aug 2006 22:12:44 -0400 (EDT) To: Geoff Parker cc: pgsql admin Subject: Re: disk usage spike In-reply-to: <20060808012736.20614.qmail@web57211.mail.re3.yahoo.com> References: <20060808012736.20614.qmail@web57211.mail.re3.yahoo.com> Comments: In-reply-to Geoff Parker message dated "Mon, 07 Aug 2006 18:27:36 -0700" Date: Mon, 07 Aug 2006 22:12:44 -0400 Message-ID: <24609.1155003164@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.141 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/82 X-Sequence-Number: 22626 Geoff Parker writes: > I have a database with about 155GB of binary data in large objects and 15GB of data in other tables. In compressed form, it consumes about 60GB on disk. On friday, the amount of disk usage increased to 240GB (over a period of 5 minutes), stayed at 240GB for 2 days, and then returned to 60GB (again over a period of about 5 minutes). It's impossible to say much with only that amount of information. If we knew what part of the database had bloated (table? index? WAL log?) we could perhaps offer some wisdom. Next time, use "du" and and related tools to see where the space went. regards, tom lane From geoffparkernews@yahoo.ca Tue Aug 8 03:36:22 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 984A39FB28B for ; Tue, 8 Aug 2006 00:36:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 70855-09 for ; Tue, 8 Aug 2006 03:36:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from web57211.mail.re3.yahoo.com (web57211.mail.re3.yahoo.com [216.252.111.227]) by postgresql.org (Postfix) with SMTP id 0BD2E9FB261 for ; Tue, 8 Aug 2006 00:36:12 -0300 (ADT) Received: (qmail 34784 invoked by uid 60001); 8 Aug 2006 03:36:12 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=xXaWp2mKXkncZ05Nk104J/V5YNPn+WOw11sVPqZmkrnVtyEkZv9ggyNd6YWyszEVkLWCKJ/xb8udVp+XRqk8B7JSW1VUUGmkAzYdJidKaMYZQGwkiLUE3Tr11ukAsfhRqVXLO7376NPhCwRHCBIj0J7e+jRsdGDfSEpfl2KBCzo= ; Message-ID: <20060808033612.34782.qmail@web57211.mail.re3.yahoo.com> Received: from [203.144.27.9] by web57211.mail.re3.yahoo.com via HTTP; Mon, 07 Aug 2006 20:36:12 PDT Date: Mon, 7 Aug 2006 20:36:12 -0700 (PDT) From: Geoff Parker Reply-To: Geoff Parker Subject: Re: disk usage spike To: Tom Lane Cc: pgsql admin In-Reply-To: <24609.1155003164@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1621726822-1155008172=:32276" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.575 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_30_40, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200608/83 X-Sequence-Number: 22627 --0-1621726822-1155008172=:32276 Content-Type: text/plain; charset=us-ascii Unfortunately I didn't notice the problem until I saw the logs today, and by then it was back tor normal. Is it safe to assume this is abnormal behaviour? Geoff. ----- Original Message ---- From: Tom Lane To: Geoff Parker Cc: pgsql admin Sent: Tuesday, August 8, 2006 12:12:44 PM Subject: Re: [ADMIN] disk usage spike Geoff Parker writes: > I have a database with about 155GB of binary data in large objects and 15GB of data in other tables. In compressed form, it consumes about 60GB on disk. On friday, the amount of disk usage increased to 240GB (over a period of 5 minutes), stayed at 240GB for 2 days, and then returned to 60GB (again over a period of about 5 minutes). It's impossible to say much with only that amount of information. If we knew what part of the database had bloated (table? index? WAL log?) we could perhaps offer some wisdom. Next time, use "du" and and related tools to see where the space went. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend --0-1621726822-1155008172=:32276 Content-Type: text/html; charset=us-ascii
Unfortunately I didn't notice the problem until I saw the logs today, and by then it was back tor normal. 

Is it safe to assume this is abnormal behaviour?

Geoff.

----- Original Message ----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Geoff Parker <geoffparkernews@yahoo.ca>
Cc: pgsql admin <pgsql-admin@postgresql.org>
Sent: Tuesday, August 8, 2006 12:12:44 PM
Subject: Re: [ADMIN] disk usage spike

Geoff Parker <geoffparkernews@yahoo.ca> writes:
> I have a database with about 155GB of binary data in large objects and 15GB of data in other tables.  In compressed form, it consumes about 60GB on disk.  On friday, the amount of disk usage increased to 240GB (over a period of 5 minutes), stayed at 240GB for 2 days, and then returned to 60GB (again over a period of about 5 minutes).

It's impossible to say much with only that amount of information.  If we
knew what part of the database had bloated (table? index? WAL log?) we
could perhaps offer some wisdom.  Next time, use "du" and and related
tools to see where the space went.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

--0-1621726822-1155008172=:32276-- From jnasby@pervasive.com Wed Aug 9 02:54:31 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 224FA9FB2E1 for ; Tue, 8 Aug 2006 23:54:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 10518-07-2 for ; Wed, 9 Aug 2006 02:54:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id C9FB29FB1CC for ; Tue, 8 Aug 2006 23:54:25 -0300 (ADT) Received: from [192.168.42.113] (natpool.bovine.net [67.100.216.14]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTP id 5CAA156437; Tue, 8 Aug 2006 21:54:24 -0500 (CDT) In-Reply-To: <20060808033612.34782.qmail@web57211.mail.re3.yahoo.com> References: <20060808033612.34782.qmail@web57211.mail.re3.yahoo.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Tom Lane , pgsql admin Content-Transfer-Encoding: 7bit From: Jim Nasby Subject: Re: disk usage spike Date: Tue, 8 Aug 2006 11:53:37 -0500 To: Geoff Parker X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/104 X-Sequence-Number: 22647 On Aug 7, 2006, at 10:36 PM, Geoff Parker wrote: > Unfortunately I didn't notice the problem until I saw the logs > today, and by then it was back tor normal. > > Is it safe to assume this is abnormal behaviour? Probably, unless you had a transaction running for 2 days that was using space in pgsql_tmp. Another possibility would be if you killed a backend that had stuff in pgsql_tmp and it didn't clean that up for some reason, but I don't think it should be possible for that to happen. There's also the remote possibility that a table bloated due to a lot of rows being updated, and that table later ended up with a bunch of empty pages at the end of the table, which vacuum then removed. > ----- Original Message ---- > From: Tom Lane > To: Geoff Parker > Cc: pgsql admin > Sent: Tuesday, August 8, 2006 12:12:44 PM > Subject: Re: [ADMIN] disk usage spike > > Geoff Parker writes: > > I have a database with about 155GB of binary data in large > objects and 15GB of data in other tables. In compressed form, it > consumes about 60GB on disk. On friday, the amount of disk usage > increased to 240GB (over a period of 5 minutes), stayed at 240GB > for 2 days, and then returned to 60GB (again over a period of about > 5 minutes). > > It's impossible to say much with only that amount of information. > If we > knew what part of the database had bloated (table? index? WAL log?) we > could perhaps offer some wisdom. Next time, use "du" and and related > tools to see where the space went. > > regards, tom lane > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend > > -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461