From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
Cc: | Warren <warren(at)clarksnutrition(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Performance Problems |
Date: | 2006-02-22 20:31:41 |
Message-ID: | 20060222203141.GG86022@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Feb 20, 2006 at 02:38:08PM -0600, Scott Marlowe wrote:
> On Mon, 2006-02-20 at 14:12, Warren wrote:
> > I have one table that gets slower and slower over time. It has a lot of
> > UPDATES INSERTS and DELETES run on it. It may have as many as 20,000 rows at
> > any given time. I am running autovacuum using the following command line:
> >
> > /usr/local/pgsql/bin/pg_autovacuum -D -s -S -L
> > /usr/local/pgsql/log/autovacuum -U postgres -P password -H 127.0.0.1 -p 5432
> >
> > It does speed back up after I do a full vacuum on it. What can I do to keep
> > the performance consistent.
>
> You likely don't have high enough FSM settings.
>
> Run your database for a while (24 hours or so) without running a vacuum
> full. Regular vacuums are fine.
>
> Then, by hand, run vacuum verbose and it will tell you how many extra
> pages / slots you need.
http://www.pervasivepostgres.com/lp/newsletters/2005/Insights_opensource_Nov.asp#3
has some more info on that. Also, pg_autovacuum's default scaling
factors are *way* too high. I'd recommend setting them to 0.2 for
vacuums and 0.1 for analyze. You might also want to drop the thresholds;
something closer to 200-300 for vacuum.
Another option given the size of that table is to vacuum just it every
minute or so from crontab.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | John McCawley | 2006-02-22 22:36:43 | now() time off |
Previous Message | Jim C. Nasby | 2006-02-22 20:27:33 | Re: How to specify infinity for intervals ? |