Repository navigation
bench: sample table health over an extend run and compare autovacuum variants - #258
Merged
Merged
Conversation
…variants The extend sweep ran each point for 60 s, so it saw one autovacuum cycle and could not tell whether table size, index size or fetch time settle. A sampler now records them every --sample-interval seconds, and --vacuum runs each point untuned, with outbox_autovacuum_ddl defaults, or with the cost throttle off.
Benchmark gate✅ gate passed
Gated (fails the build): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The extend benchmark from #255 ran each point for 60 seconds with the default autovacuum tuning. That covers a single autovacuum cycle and has nothing to compare against, so it can't say whether a heartbeat table settles down or keeps growing. This PR adds what a longer run needs. Library code is unchanged, and nothing here is part of the CI gate.
Changes
Sampling. While the load runs, a separate connection records the following every
--sample-intervalseconds (default 10), plus once more at the end:pg_stat_statements.The sampler's query contains
pg_stat, so the probe'sNOT ILIKE '%pg_stat%'filter leaves it out of the statement counters, just like the probe's own queries. It has its own one-connection pool, so it doesn't compete with the ping pool.Autovacuum variants.
--vacuumtakes one or more of:untuned: no reloptions;tuned: theoutbox_autovacuum_ddl()defaults, which is what every point used before;unthrottled: those defaults plusvacuum_cost_delay=0.Each selected point runs once per variant.
Report. Point labels now include the variant (
r1000-b1/tuned). A third table, shown when samples exist, gives start / end / peak table and index size, peak dead tuples, the autovacuum count, and the mean fetch time over the first and last minute.--jsonincludes every sample.The next step is a 15-minute matrix:
r1000-b1,r3000-b1andr10000-b50× all three variants. Its results will go into a separate docs PR.Checks
tests/test_benchmarks.py: 45 passed.just lintis clean.r1000-b1against all three variants produced 5 samples per point and rendered all three tables.