Re: Unusually high IO for autovacuum worker

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Vlad Bailescu <vlad(at)mojitosoftware(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unusually high IO for autovacuum worker
Date: 2013-02-01 13:27:58
Message-ID: 1359725278.85293.YahooMailNeo@web162901.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Vlad Bailescu <vlad(at)mojitosoftware(dot)com> wrote:

> Because of our application stack (Hibernate ORM) we use a
> before_insert trigger to insert rows into the right partition and
> in the master table and then an after_insert trigger to delete
> them from master table (we need the original insert to return the
> inserted row info). This means the master table becomes quickly
> populated with dead tuples and triggers the autovacuum frequently
> (we are using default settings for autovacuum).
>
> After upgrading our DB from 8.4 to 9.1 (and moving from Debian 6
> to Ubuntu 12.04) we noticed a large increase in IO and traced it
> back to auto vacuum: iotop and collectd report bursts of 4-6M/s
> taking 90 seconds followed by a 30 seconds pause. That's a lot of
> data to chew on especially since the master table is only a
> couple of megabytes (indexes included).
>
> Can anyone please explain why this is happening and how we can
> get around it?

It sounds like it could be an issue which will be fixed in the next
minor release:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5454344b968d6a189219cfd49af609a3e7d6af33

If this is the issue, a periodic manual VACUUM of the master table
should help for now.  When 9.1.8 is released you might want to
upgrade without a lot of delay, and see if you are then OK without
the manual vacuums.

-Kevin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vlad Bailescu 2013-02-01 13:40:43 Re: Unusually high IO for autovacuum worker
Previous Message Martin Gainty 2013-02-01 13:16:40 Postgres version number support

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2013-02-01 13:34:21 Re: parameter info?
Previous Message Pavan Deolasee 2013-02-01 13:15:08 Turning auto-analyze off (was Re: [GENERAL] Unusually high IO for autovacuum worker)