Re: [GENERAL] Vacuums taking forever :(

2009-02-04 Thread Gregory Stark
Phoenix Kiula phoenix.ki...@gmail.com writes: Thanks, Gregory and Simon, for the very useful posts. I have increased the vacuum_cost_limit to 2000 for now, just to see if that has an impact. Hopefully positive. Note that that was offhand speculation. Conventional wisdom is that it should

[GENERAL] Vacuums taking forever :(

2009-02-03 Thread Phoenix Kiula
In my conf_pg, the autovacuum is on, so the DB should be (or I hope is being) regularly vacuumed. These are my settings: work_mem = 20MB temp_buffers = 4096 authentication_timeout = 10s ssl = off checkpoint_warning =

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phoenix Kiula schrieb: In my conf_pg, the autovacuum is on, so the DB should be (or I hope is being) regularly vacuumed. These are my settings: work_mem = 20MB temp_buffers = 4096 authentication_timeout

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Andrew Sullivan
On Tue, Feb 03, 2009 at 08:46:37PM +0800, Phoenix Kiula wrote: The autovacuum was clearly not enough, so we also have a crontab that vacuums the tables every hour. This is PG 8.2.9. How did you determine this? What was it not enough for? Which tables? Why didn't you tune autovacuum

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Phoenix Kiula
On Tue, Feb 3, 2009 at 9:09 PM, Andreas Wenk a.w...@netzmeister-st-pauli.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phoenix Kiula schrieb: In my conf_pg, the autovacuum is on, so the DB should be (or I hope is being) regularly vacuumed. These are my settings: work_mem

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phoenix Kiula schrieb: On Tue, Feb 3, 2009 at 9:09 PM, Andreas Wenk a.w...@netzmeister-st-pauli.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phoenix Kiula schrieb: In my conf_pg, the autovacuum is on, so the DB should be (or I hope

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Gregory Stark
Phoenix Kiula phoenix.ki...@gmail.com writes: autovacuum_vacuum_cost_delay = 20 vacuum_cost_delay= 20 These say to sleep 20ms every few pages. These cron jobs are taking over 35 minutes for a vacuum! What's the use of a vacuum if it takes that long, and the DB performance is

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Simon Riggs
On Tue, 2009-02-03 at 20:46 +0800, Phoenix Kiula wrote: This is PG 8.2.9 VACUUM spoils the cache in 8.2 What happens is that VACUUM reads through the whole table, knocking other blocks out of cache. These then need to be read in again by other processes, so there is some I/O thrashing. If your

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Alan Hodgson
On Tuesday 03 February 2009, Phoenix Kiula phoenix.ki...@gmail.com wrote: The autovacuum was clearly not enough, so we also have a crontab that vacuums the tables every hour. This is PG 8.2.9. How did you determine it wasn't enough? As others have stated, you're causing your own slowdown by

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Phoenix Kiula
Thanks, Gregory and Simon, for the very useful posts. I have increased the vacuum_cost_limit to 2000 for now, just to see if that has an impact. Hopefully positive. Next on my list is to be able to easily upgrade to 8.3, but Slony seemed like a daunting task the last time I tried. I am on 8.2.9,