Manual vacs 5x faster than autovacs?

From: Wayne Beaver <wayne(at)acedsl(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Manual vacs 5x faster than autovacs?
Date: 2009-11-12 14:33:01
Message-ID: 20091112093301.11953uc4r7pgqzy8@www.aceinnovative.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi All,

Running Pg 8.3RC2, Linux server, w/8GB RAM, OpenSuSE 10.2 OS (yes, I
know that's old). I have seen *really* long-running autovacs eating up
system resources. While the below is not an example of *really* long,
it shows how I killed an autovac which had been running for more than
10 minutes, then ran a VAC FULL ANALYZE on same exact table in about
~2 min. Any wisdom here? Attributable to autovac_worker settings? Or
Pg version? Other?

Any insight appreciated.

wb

++++++++++++++++++++++++++

$ psql template1 -c "SELECT procpid, current_query, to_char (now() -
backend_start, 'HH24:MI:SS') AS connected_et, to_char (now() -
query_start,'HH24:MI:SS') AS query_et FROM pg_stat_activity WHERE
datname='mydb' ORDER BY query_et DESC LIMIT 1"

procpid | current_query | connected_et
| query_et
---------+--------------------------------------------+--------------+----------
9064 | autovacuum: VACUUM ANALYZE myschema.mytable | 00:12:07
| 00:11:38

$ kill 9064

$ date; psql mydb -c "VACUUM FULL ANALYZE myschema.mytable"; date
Wed Nov 11 17:25:41 UTC 2009
VACUUM
Wed Nov 11 17:27:59 UTC 2009

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-11-12 14:49:52 Re: Manual vacs 5x faster than autovacs?
Previous Message Laurent Laborde 2009-11-12 14:21:25 Re: limiting performance impact of wal archiving.