Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower.

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: David Gould <daveg(at)sonic(dot)net>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower.
Date: 2015-11-03 22:24:25
Message-ID: 20151103222425.GO6104@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

David Gould wrote:

> This is for an idle system with 100,000 new small tables to analyze. I ran
> all the test for an hour or 5000 tables processed. "jj" refers to the patch
> from Jeff Janes, "dg" refers to the attached patch (same as previous).
>
> /autovacuum actions per minute/
> workers 9.5b1 jj dg
> ------- ----- ---- -----
> 1 183 171 285
> 4 45 212 1158
> 8 23 462 1225

Nice numbers.

> Could someone please take a look at the patch and comment? Thanks.

1. What's with all the FIXMEs?

2. I think you need more of an explanation of what your patch actually
does.

3. Do we want to backpatch? Changes in behavior aren't acceptable on
existing branches, because it might destabilize autovacuum behavior
that's been carefully tuned in existing systems. So if we want
something to backpatch, ideally it shouldn't change the ordering in
which tables are vacuumed, and instead arrive at the same results
faster. (I don't care about this restriction myself, but others do and
strongly so.)

4. In the master branch, behavior changes are acceptable, so we can do
something more invasive.

5. Is it easier to use a binary heap rather than the OID list thing you
have? (see src/include/lib/binaryheap.h) I don't think so, but it's
worth asking. Note that older branches don't have this, so
backpatchable should not rely on it.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-11-03 23:37:02 Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
Previous Message David Gould 2015-11-03 22:10:06 Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower.