Unix Technical Forum

Re: Unexplained growth of tables

This is a discussion on Re: Unexplained growth of tables within the pgsql Admins forums, part of the PostgreSQL category; --> Thaks to all who helped on this one, for I was going insane. I am now auto_vacuuming every 30 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 07:25 AM
Benjamin Krajmalnik
 
Posts: n/a
Default Re: Unexplained growth of tables

Thaks to all who helped on this one, for I was going insane.

I am now auto_vacuuming every 30 seconds, and have cheanged the
para,eters so the vacuuming takes place much more aggressively.
Performance has increased and table size appears to have been addressed.

For the newbies like myself who may make the same mistake .....

I assumed that auto_vacuum was going to adversely affect perfromance if
it ran often, so I extended the time between atovacuum cycles.
BIG MISTAKE!
I assume in many applicatios the net effet may not be huge, but in our
application where currently we have more than 10 million insert/update
transactions per day, it definitaly made a difference.
I pulled my hair long on this one until the light bulb came on and I
figured out it must be related to MVCC and the vast amount of change to
the database at any given time.

Once again, thanks to all of you who were kind enough to point me in the
right direction.



> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailtogsql-admin-owner@postgresql.org] On Behalf Of
> Benjamin Krajmalnik
> Sent: Sunday, July 23, 2006 2:06 PM
> To: Tom Lane; Peter Eisentraut
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Unexplained growth of tables
>
> I am running 8.1.4 on Windows.
> Quick question - I assume CLUSTER will lock the tables, correct?
> In my scenario where the number of live rows is very small
> but the number of dead rows is huge, how long will tis take?
> I have a problem in that this database is a live monitoring
> system which I cannot take down for too long.
>
> The only database on this server (other than the postgres
> database) is this database.
> From your experience, based on the activity of this database,
> how often should I run autovacuum?
>
>
> > -----Original Message-----
> > From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> > Sent: Sunday, July 23, 2006 11:48 AM
> > To: Peter Eisentraut
> > Cc: pgsql-admin@postgresql.org; Benjamin Krajmalnik
> > Subject: Re: [ADMIN] Unexplained growth of tables
> >
> > Peter Eisentraut <peter_e@gmx.net> writes:
> > > Benjamin Krajmalnik wrote:
> > >> What can be causing this growth? Not vacuuming often enough?

> >
> > > The is exactly the reason.

> >
> > >> I hav
> > >> pg_autovacuum running every 60 seconds. These tables have 10-15
> > >> insert/update statements per second.

> >
> > > You should probably run VACUUM FULL to get the table back

> > to a normal
> > > size and then closely monitor what pg_autovacuum actually does.

> >
> > CLUSTER might be a better answer, since VACUUM FULL won't

> do anything
> > to help shrink the indexes.
> >
> > As for the pg_autovacuum frequency, realize that pg_autovacuum
> > processes one database per firing. So if you have N databases, any
> > one database is going to be looked at every N*60 seconds,

> not every 60
> > seconds.
> > You might need a shorter autovacuum cycle.
> >
> > Lastly, what PG version is this? We had some bugs that kept
> > autovacuum from being fully informed in some cases, but

> AFAIK they're
> > all fixed in the latest minor releases.
> >
> > regards, tom lane
> >

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


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:35 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com