pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Gould <daveg@sonic.net>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower.
Date: Sat, 31 Oct 2015 05:18:53 -0700
Message-ID: <20151031051853.074e23b7@engels> (raw)
In-Reply-To: <20151031032051.2aa03b65@engels>
References: <20151030133252.3033.4249@wrigleys.postgresql.org>
	<20151030134646.GE5726@alvherre.pgsql>
	<20151030072704.1a4db344@engels>
	<20151030151711.GF5726@alvherre.pgsql>
	<13594.1446219627@sss.pgh.pa.us>
	<CAMkU=1zQUAV6Zv3O7R5BO8AfJO+LAw7satHYfd+V2t5MO3Bp4w@mail.gmail.com>
	<20151030231952.70eb5887@engels>
	<20151031013714.7e29af3b@engels>
	<20151031032051.2aa03b65@engels>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

 
I've collected strace output for a one minute interval with 4 autovacuum
workers on my test setup for stock 9.5beta1, Jeff Janes vac_mov_lock patch,
and my ordered oids / high watermark patch. These results are normalized to
times and number of calls per table analyzed by autovacuum.

To refresh, on this setup:

Patch Version       TPM
none                 85
vac_mov_lock        600
ordered oids       5225

Strace summary:

postgresql 9.5 beta1 cost per table @ 85 tables per minute.
-----------------------------------------------------------

 calls    msec    system call        [ 4 autovacuum workers ]
------  ------    -------------------
 19.46  196.09    select(0,          <<< Waiting for stats snapshot
  3.26 1040.46    semop(43188238,    <<< Waiting for AutovacuumScheduleLock
  2.05    0.83    sendto(8,          <<< Asking for stats snapshot

 calls    msec    system call        [ stats collector ]
------  ------    -------------------
  3.02    0.05    recvfrom(8,        <<< Request for snapshot refresh
  1.55  248.64    rename("pg_stat_tmp/db_16385.tmp",  <<< Snapshot refresh



9.5beta1 + Jeff Janes vac_mov_lock.patch cost per table @ 600 tpm
-----------------------------------------------------------------

 calls    msec    system call        [ 4 autovacuum workers ]
------  ------    -------------------
 24.90  260.16    select(0,           <<< Waiting for stats snapshot
  1.41    0.02    sendto(8,           <<< Asking for stats snapshot

 calls    msec    system call        [ stats collector ]
------  ------    -------------------
  1.29    0.02    recvfrom(8,         <<< Request for snapshot refresh
  0.59   62.40    rename("pg_stat_tmp/db_16385.tmp",  <<< Snapshot refresh



9.5beta1 + David Gould autovacuum ordering patch cost per table @ 5225 tpm
--------------------------------------------------------------------------

 calls    msec    system call        [ 4 autovacuum workers ]
------  ------    -------------------
  0.63    6.34    select(0,          <<< Waiting for stats snapshot
  0.21    0.01    sendto(8,          <<< Asking for stats snapshot
  0.07    0.00    semop(43712518,    <<< Waiting for AutovacuumLock

 calls    msec    system call        [ stats collector ]
------  ------    -------------------
  0.40    0.01    recvfrom(8,        <<< Request for snapshot refresh
  0.04    6.75    rename("pg_stat_tmp/db_16385.tmp",  <<< Snapshot refresh

-dg

-- 
David Gould                                   daveg@sonic.net
If simplicity worked, the world would be overrun with insects.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (38+ messages)  latest in thread

Message-ID: <20151031051853.074e23b7@engels>
Permalink:  ../20151031051853.074e23b7@engels/
Also on:    postgresql.org/message-id/20151031051853.074e23b7@engels

 · 

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-bugs@postgresql.org
  Cc: daveg@sonic.net, jeff.janes@gmail.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
  Subject: Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower.
  In-Reply-To: <20151031051853.074e23b7@engels>
  References: <20151030133252.3033.4249@wrigleys.postgresql.org> <20151030134646.GE5726@alvherre.pgsql> <20151030072704.1a4db344@engels> <20151030151711.GF5726@alvherre.pgsql> <13594.1446219627@sss.pgh.pa.us> <CAMkU=1zQUAV6Zv3O7R5BO8AfJO+LAw7satHYfd+V2t5MO3Bp4w@mail.gmail.com> <20151030231952.70eb5887@engels> <20151031013714.7e29af3b@engels> <20151031032051.2aa03b65@engels> <20151031051853.074e23b7@engels>

* 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