Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ztk0x-0006WA-4L for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2015 22:25:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Ztk0v-0000Np-Hi for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Nov 2015 22:25:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Ztk0J-00085W-Cy for pgsql-bugs@postgresql.org; Tue, 03 Nov 2015 22:24:35 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Ztk0E-0000NZ-IM for pgsql-bugs@postgresql.org; Tue, 03 Nov 2015 22:24:34 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.52.149]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 41F10400B33; Tue, 3 Nov 2015 14:24:27 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4911227CA; Tue, 3 Nov 2015 19:24:25 -0300 (CLT) Date: Tue, 3 Nov 2015 19:24:25 -0300 From: Alvaro Herrera To: David Gould Cc: Jeff Janes , Tom Lane , Pg Bugs Subject: Re: BUG #13750: Autovacuum slows down with large numbers of tables. More workers makes it slower. Message-ID: <20151103222425.GO6104@alvherre.pgsql> References: <20151030133252.3033.4249@wrigleys.postgresql.org> <20151030134646.GE5726@alvherre.pgsql> <20151030072704.1a4db344@engels> <20151030151711.GF5726@alvherre.pgsql> <13594.1446219627@sss.pgh.pa.us> <20151030231952.70eb5887@engels> <20151103141006.5a87bba2@engels> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151103141006.5a87bba2@engels> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs