Re: Berserk Autovacuum (let's save next Mandrill)
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Andres Freund <andres@anarazel.de>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, David Rowley <dgrowleyml@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Darafei Komяpa Praliaskouski <me@komzpa.net>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Alvaro Herrera <alvherre@2ndquadrant.com>, Michael Banck <mbanck@gmx.net>
Date: 2020-03-23T13:27:29Z
Lists: pgsql-hackers
Attachments
- 0001-Autovacuum-tables-that-have-received-only-inserts.v10.patch (text/x-patch) patch v10-0001
On Fri, 2020-03-20 at 14:43 +0100, Laurenz Albe wrote: > I.e. with the default settings we will perform a whole-index scan > > (without visibility map or such) after every 10% growth of the > > table. Which means that, even if the visibility map prevents repeated > > tables accesses, increasing the rate of vacuuming for insert-only tables > > can cause a lot more whole index scans. Which means that vacuuming an > > insert-only workload frequently *will* increase the total amount of IO, > > even if there is not a single dead tuple. Rather than just spreading the > > same amount of IO over more vacuums. > > > > And both gin and gist just always do a full index scan, regardless of > > vacuum_cleanup_index_scale_factor (either during a bulk delete, or > > during the cleanup). Thus more frequent vacuuming for insert-only > > tables can cause a *lot* of pain (even an approx quadratic increase of > > IO? O(increased_frequency * peak_index_size)?) if you have large > > indexes - which is very common for gin/gist. > > In the light of that, I agree that we should increase the scale_factor. Here is version 10 of the patch, which uses a scale factor of 0.2. Yours, Laurenz Albe
Commits
-
Further improve stability fix for partition_aggregate test.
- 18d85e9b8a2b 13.0 landed
-
Improve stability fix for partition_aggregate test.
- 7cb0a423f914 13.0 landed
-
Attempt to stabilize partitionwise_aggregate test
- cefb82d49e21 13.0 landed
-
Fix race condition in statext_store().
- fe3036527a1f 13.0 landed
- 6c426cd43790 12.3 landed
-
Attempt to fix unstable regression tests, take 2
- 24566b359d09 13.0 landed
-
Attempt to fix unstable regression tests
- 2dc16efedc76 13.0 landed
-
Trigger autovacuum based on number of INSERTs
- b07642dbcd8d 13.0 landed
-
Fix upper limit for vacuum_cleanup_index_scale_factor
- 4d54543efa5e 11.0 cited