pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Kupershmidt <schmiddy@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Chris <lists@deksai.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: stats collector suddenly causing lots of IO
Date: Fri, 16 Apr 2010 13:43:17 -0400
Message-ID: <m2w4ec1cf761004161043yd59174a5h9fb011a16608d96d@mail.gmail.com> (raw)
In-Reply-To: <11152.1271436528@sss.pgh.pa.us>
References: <20100413170105.GA29571@chris-laptop.a2hosting.com>
	<25952.1271370711@sss.pgh.pa.us>
	<z2s4ec1cf761004160739w3ac5511jd39263dd043e2da6@mail.gmail.com>
	<9738.1271431432@sss.pgh.pa.us>
	<g2t4ec1cf761004160830q5dff4315rcc0294d342999c35@mail.gmail.com>
	<10082.1271432484@sss.pgh.pa.us>
	<h2p4ec1cf761004160931r47cf4949o9a2fc14529c17ab1@mail.gmail.com>
	<11152.1271436528@sss.pgh.pa.us>

On Fri, Apr 16, 2010 at 12:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Josh Kupershmidt <schmiddy@gmail.com> writes:
>> Hrm, well autovacuum is at least trying to do work: it's currently
>> stuck on those bloated pg_catalog tables, of course. Another developer
>> killed an autovacuum of pg_attribute (or maybe it was pg_attrdef)
>> after it had been running for two weeks. See current pg_stat_activity
>> output attached, which shows the three autovacuum workers running plus
>> two manual VACUUM ANALYZEs I started yesterday.
>
> Two weeks?  What have you got the autovacuum cost delays set to?

SELECT name, current_setting(name), source FROM pg_settings WHERE
source != 'default' AND name ILIKE '%vacuum%';
         name         | current_setting |       source
----------------------+-----------------+--------------------
 vacuum_cost_delay    | 200ms           | configuration file
 vacuum_cost_limit    | 100             | configuration file
 vacuum_cost_page_hit | 6               | configuration file
(3 rows)

I'm guessing these values and the default autovacuum configuration
values need to be cranked significantly to make vacuum much more
aggressive :-(

> Once you're up to three AV workers, no new ones can get launched until
> one of those finishes or is killed.  So that would explain failure to
> prune the stats collector's tables (the tabpurge code is only run during
> AV worker launch).  So what we need to figure out is why it's taking so
> obscenely long to vacuum these tables ...
>

Hopefully changing those three vacuum_cost_* params will speed up the
manual- and auto-vacuums.. it'll take me a few days to see any
results, since I still need to do something about the bloat that's
already there.

Josh



view thread (22+ messages)  latest in thread

Message-ID: <m2w4ec1cf761004161043yd59174a5h9fb011a16608d96d@mail.gmail.com>
Permalink:  ../m2w4ec1cf761004161043yd59174a5h9fb011a16608d96d@mail.gmail.com/
Also on:    postgresql.org/message-id/m2w4ec1cf761004161043yd59174a5h9fb011a16608d96d@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: schmiddy@gmail.com, tgl@sss.pgh.pa.us, lists@deksai.com
  Subject: Re: stats collector suddenly causing lots of IO
  In-Reply-To: <m2w4ec1cf761004161043yd59174a5h9fb011a16608d96d@mail.gmail.com>
  References: <20100413170105.GA29571@chris-laptop.a2hosting.com> <25952.1271370711@sss.pgh.pa.us> <z2s4ec1cf761004160739w3ac5511jd39263dd043e2da6@mail.gmail.com> <9738.1271431432@sss.pgh.pa.us> <g2t4ec1cf761004160830q5dff4315rcc0294d342999c35@mail.gmail.com> <10082.1271432484@sss.pgh.pa.us> <h2p4ec1cf761004160931r47cf4949o9a2fc14529c17ab1@mail.gmail.com> <11152.1271436528@sss.pgh.pa.us> <m2w4ec1cf761004161043yd59174a5h9fb011a16608d96d@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox