Re: Displaying accumulated autovacuum cost

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Displaying accumulated autovacuum cost
Date: 2011-08-29 15:03:28
Message-ID: CA+TgmoYWEVBV68VSSM17TTWQ16bJGD1V_OZyeZepKbq6bOaKVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 28, 2011 at 5:54 AM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
> Updated patch cleans up two diff mistakes made when backing out the progress
> report feature.  The tip-off I screwed up should have been the absurdly high
> write rate shown.  The usleep was accidentally deleted, so it was running
> without cost limits even applying.  Here's a good one instead:
>
> LOG:  automatic vacuum of table "pgbench.public.pgbench_accounts": index
> scans: 1
>    pages: 0 removed, 163935 remain
>    tuples: 2000000 removed, 2928356 remain
>    buffer usage: 117393 hits, 123351 misses, 102684 dirtied, 2.168 MiB/s
> write rate
>    system usage: CPU 2.54s/6.27u sec elapsed 369.99 sec

I postulate that this change isn't needed until you get to the part
where we do some kind of intermediate progress reporting:

! if (Log_autovacuum_min_duration > 0 || VacuumCostActive)

Instead of doing this only when vacuum costing is active, could we
drive it off of the pgBufferUsage stuff (maybe with a few tweaks...)
and do it unconditionally?

To me it seems like it would better to say "write rate xyz MB/s"
rather than "xyz MB/s write rate", but maybe I'm in the minority on
that one.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Valentine Gogichashvili 2011-08-29 15:03:29 Re: confusing invalid UTF8 byte sequence error
Previous Message Shigeru Hanada 2011-08-29 14:54:41 Join push-down for foreign tables