Обсуждение: about the performance of autovacuum and vacuumdb?

Поиск
Список
Период
Сортировка

about the performance of autovacuum and vacuumdb?

От
"ivan.hou"
Дата:
i try to compare two methods of garbage-collect.(Postgresql Ver:8.1.3)

1. enable autovacuum without using vacuumdb -f mydb in crontab.
2. using crontab to vacuumdb in every 10 min (autovacuum disable)


the method 2 got more free space than method 1.


the disk size of database still  increased in method 1.
so, what's the advantage of autovacuum?

--
View this message in context:
http://www.nabble.com/about-the-performance-of-autovacuum-and-vacuumdb--tp14431704p14431704.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: about the performance of autovacuum and vacuumdb?

От
Alvaro Herrera
Дата:
ivan.hou wrote:

> so, what's the advantage of autovacuum?

The fact that it acts on demand.  If it's not taking action soon enough,
you need to adjust the config parameters.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: about the performance of autovacuum and vacuumdb?

От
"Scott Marlowe"
Дата:
On Dec 20, 2007 12:50 AM, ivan.hou <ivan.hou@msa.hinet.net> wrote:
>
> i try to compare two methods of garbage-collect.(Postgresql Ver:8.1.3)
>
> 1. enable autovacuum without using vacuumdb -f mydb in crontab.
> 2. using crontab to vacuumdb in every 10 min (autovacuum disable)
>
> the method 2 got more free space than method 1.
>
> the disk size of database still  increased in method 1.
> so, what's the advantage of autovacuum?

That really depends.  Did the db size increase at first under method
1, then reach a steady state, or did it just keep bloating.  It might
well be that vacuuming every 10 minutes cost you more in terms of
performance than would using autovacuum, and the trade off was
slightly more disk space used.  Or it could be the db was bloating.
If the db was bloating, as Alvaro mentioned, you likely don't have
aggressive enough settings for autovacuum.

Also, update your pg install to the latest 8.1.x version, 8.1.3 has
quite a few nasty bugs in it.