mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-23 13:45:42 +00:00
perf: add flight coalesce regression case with high-cardinality aggregations (#9214)
* perf: add flight coalesce regression case with high-cardinality aggregations Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * perf: add flight coalesce aggregations bench case Add a direct_readable_sst case exercising grouped aggregation over coalesced batches: 16 hosts x 4096 instances, 32 SSTs of 32768 rows, timestamp-major series layout, three SQL queries (aggregation, topk, count_by_host) each with a 10% max candidate latency regression threshold. Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> --------- Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
# Qualification case for the Flight record-batch coalescing on the
|
||||
# datanode-to-frontend path (#9167). mito2 emits small (2k-row) batches for
|
||||
# timestamp-major layouts; the coalescer should merge them before they cross
|
||||
# the internal Flight connection. High-cardinality tags make the aggregate and
|
||||
# topk outputs wide, so the extra batches are visible end to end.
|
||||
|
||||
[case]
|
||||
name = "flight_coalesce_aggregations"
|
||||
description = "Aggregate and topk queries over a high-cardinality direct-SST fixture exercising Flight batch coalescing"
|
||||
|
||||
[scenario]
|
||||
kind = "direct_readable_sst"
|
||||
seed = 9167
|
||||
|
||||
[[scenario.tables]]
|
||||
database = "public"
|
||||
name = "flight_coalesce_metrics"
|
||||
engine = "mito"
|
||||
append_mode = true
|
||||
sst_format = "flat"
|
||||
primary_key = ["host", "instance"]
|
||||
time_index = "ts"
|
||||
|
||||
[[scenario.tables.columns]]
|
||||
name = "host"
|
||||
type = "STRING"
|
||||
semantic = "tag"
|
||||
distribution = { kind = "cardinality", values = 16, prefix = "host" }
|
||||
|
||||
[[scenario.tables.columns]]
|
||||
name = "instance"
|
||||
type = "STRING"
|
||||
semantic = "tag"
|
||||
distribution = { kind = "cardinality", values = 4096, prefix = "instance" }
|
||||
|
||||
[[scenario.tables.columns]]
|
||||
name = "value"
|
||||
type = "DOUBLE"
|
||||
semantic = "field"
|
||||
distribution = { kind = "deterministic_wave", min = 0.0, max = 1000.0 }
|
||||
|
||||
[[scenario.tables.columns]]
|
||||
name = "ts"
|
||||
type = "TIMESTAMP(3)"
|
||||
semantic = "timestamp"
|
||||
|
||||
[scenario.layout]
|
||||
regions = 1
|
||||
sst_count = 32
|
||||
rows_per_sst = 32768
|
||||
row_group_size = 8192
|
||||
series_count = 4096
|
||||
start_unix_nanos = 1_704_067_200_000_000_000 # 2024-01-01T00:00:00Z
|
||||
step_nanos = 15_000_000_000
|
||||
time_range_layout = "non_overlapping_per_sst"
|
||||
series_layout = "timestamp_major"
|
||||
|
||||
[[scenario.queries]]
|
||||
name = "aggregation"
|
||||
kind = "sql"
|
||||
query = '''
|
||||
SELECT host, instance, avg(value), max(value), count(*)
|
||||
FROM flight_coalesce_metrics
|
||||
GROUP BY host, instance
|
||||
ORDER BY host, instance
|
||||
'''
|
||||
warmup = 3
|
||||
iterations = 9
|
||||
|
||||
[scenario.queries.thresholds]
|
||||
max_candidate_latency_regression_pct = 10
|
||||
|
||||
[[scenario.queries]]
|
||||
name = "topk"
|
||||
kind = "sql"
|
||||
query = '''
|
||||
SELECT instance, max(value)
|
||||
FROM flight_coalesce_metrics
|
||||
GROUP BY instance
|
||||
ORDER BY max(value) DESC
|
||||
LIMIT 100
|
||||
'''
|
||||
warmup = 3
|
||||
iterations = 9
|
||||
|
||||
[scenario.queries.thresholds]
|
||||
max_candidate_latency_regression_pct = 10
|
||||
|
||||
[[scenario.queries]]
|
||||
name = "count_by_host"
|
||||
kind = "sql"
|
||||
query = '''
|
||||
SELECT host, count(*)
|
||||
FROM flight_coalesce_metrics
|
||||
GROUP BY host
|
||||
'''
|
||||
warmup = 3
|
||||
iterations = 9
|
||||
|
||||
[scenario.queries.thresholds]
|
||||
max_candidate_latency_regression_pct = 10
|
||||
Reference in New Issue
Block a user