Repository navigation
kv: run the CH-benCHmark queries beside the tpcc terminals and on their own - #277
Merged
Merged
Conversation
4 of 5 tasks
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.
Part of tamnd/rudb#1390 (W7), the CH-benCHmark driver: TPC-C with analytic streams running the 22 queries.
The tpcc mode ran the TPC-C terminals and nothing else, so W7's gates (NOPM with one analytic stream at least 80% of NOPM without, and each CH query at most 1.5x its time on a load-once copy) could not be measured. This adds both runs of
bench/tpc-c/09-ch-benchmark.md.The load now makes twelve tables: the nine of TPC-C plus
region(5 rows),nation(62 rows) andsupplier(10,000 rows), as BenchBase makes them. The query texts in the newkv/src/tpcc/ch.rsare BenchBase's at revision33c00473, withoordernamedordersand every date literal moved on 14 years, from 2012 to the year of the load timestamp. Q15 reads a view of each stream's own,revenueN, so two streams do not make and drop one view between them.--analytic Nruns N streams beside the terminals. Each stream opens a session, sets its threads (SET threadson rudb,max_parallel_workers_per_gatheron PostgreSQL) to--analytic-threads, 2 unless set, prepares the 22 and runs them in a shuffled order each pass until the window ends, counting only runs that start inside it. A query the engine cannot prepare is printed asch unpreparedand skipped.--mode chis the load-once reference: each query--runstimes, 5 unless set, on one session.Both print a
ch streams= threads= texts_sha256= benchbase= shift_years=line, then ach query=Qn n= median_ms= q1_ms= q3_ms= min_ms= max_ms= rows= errors= hist_us=line for each query, ach errorline for each query that failed, andch summary streams= passes= answered= geomean_ms=, withqph=andqph_per_stream=in the mixed run. The ratios against the references come from comparing reports, not from the driver. For examplerudb-bench-kv --mode tpcc --backend rudb --target t.db --load --warehouses 2 --terminals 4 --analytic 2, thenrudb-bench-kv --mode ch --backend rudb --target t.db.Tests
main.rs:--analyticand--analytic-threadsparse in the tpcc mode,--mode chtakes--runswith 2 threads by default, and zero runs, zero threads, or--analyticoutside the tpcc mode are refused.ch.rs: every date moves on 14 years and nothing else does, each stream's Q15 reads its own view, the three added tables have their rows (62 nation keys, 10,000 suppliers), and the report has a line a query and each error once.