test(perf): compare Trino worker size and execution capacity - #1162
Closed
bill-ph wants to merge 3 commits into
Closed
test(perf): compare Trino worker size and execution capacity#1162bill-ph wants to merge 3 commits into
bill-ph wants to merge 3 commits into
Conversation
Test Impact PlanDeterministic summary of how this PR changes tests, CI runners, and coverage-risk signals. Summary
Signals
Coverage risk: likely reduced Warnings
|
bill-ph
marked this pull request as draft
September 8, 2026 23:38
Collaborator
Author
|
Closing this experiment without merging its shape-selection machinery. The completed benchmark results and analysis remain in the description. The follow-up will start from main and explicitly increase Trino execution/leaf-driver concurrency at the existing worker resource budget to test the read-concurrency hypothesis. |
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 frozen benchmark currently fixes Trino at three 1-CPU/4-GiB workers. Add a manual
trino_perf_shapechoice toscenario-devso the same workload can distinguish worker-size effects from additional execution capacity.baselinelargescaleoutlarge-scaleoutHeap and query-memory limits scale with the selected shape. The coordinator resources, Duckgres resources, Trino queries, cache policy, and iteration counts are unchanged. Scheduled runs retain the full baseline. Experiments upload resource/image/mode provenance with their results and skip baseline historical publishing. Invalid selections fail before cloud mutations; separate deploy/test invocations reject conflicting saved provenance, while teardown remains available.
Choose
trino_perf_shape=allto run all four configurations in one workflow dispatch on this branch. Images build once, and a sequential matrix runs each shape in a separate temporary stack with its own credentials and timeout. Each job attempts teardown before the next job starts; failures do not cancel the remaining shapes. This is one measurement round with the existing warmup and four measured iterations, not repeated deployment rounds.The final comparison job combines per-query Trino medians, baseline-relative workload speedup, and allocated CPU-budget efficiency in the workflow summary and a downloadable Markdown artifact. Shape artifacts have distinct names and include deployment/scenario/teardown outcomes. Missing, failed, inconsistent, or partial results are marked incomplete and fail the comparison job instead of producing a misleading comparison. The entire
allrun, including its baseline member, is excluded from historical publishing.The baseline runs the full cross-engine comparison (42 warmups and 168 measured queries). Each nonbaseline shape, including individual dispatches, measures Trino only (7 warmups and 28 measured queries), retaining identical Trino queries and iterations and the same provisioning, data setup, validation, and cleanup. Nonbaseline shapes skip Athena configuration and the runner's Athena Pod Identity association. The harness derives and records
perf_mode; unused Athena fields and requirements are removed before environment validation/template resolution. The combined report compares only Trino and accepts both the new mixed workloads and older full-workload artifacts.The perf README documents one-dispatch and individual-shape usage, comparison interpretation, and cleanup/recovery. Rerun the whole workflow for a complete new comparison; artifacts from different attempts are not combined. The latest update applies to future dispatches; it does not cancel, restart, or change an in-flight benchmark. Execution profiling is not added.
Example:
Validation:
just test-scenarioand the workflow/publisher script tests pass.tests/mw-devharness passes with the largest experimental shape exported, verifying workflow environment isolation.bash -n tests/mw-dev/run.shandgit diff --checkpass.just lintreports six existing SA4023 diagnostics at three unchanged control-plane call sites on this macOS toolchain. The identical failures reproduce on base commitd7e852d8; lint restricted to changes reports zero issues.Benchmark results
Four-shape run, September 8, 2026, at
07e3c6d1. All four shapes completed successfully with zero query errors and successful teardown. This run predates the Trino-only optimization in1fd5cfcc: every shape ran the full cross-engine workload (42 warmups and 168 measured executions). The results below compare only the identical Trino queries, with one warmup and four measured iterations per query. Dataset and Trino image provenance matched across shapes.Latency and scaling
Workload latency is the sum of the seven measured query medians, not total scenario duration or concurrent-query throughput. Resource totals below cover execution workers; the unchanged coordinator is additional.
baseline: 3 small workerslarge: 1 large workerscaleout: 6 small workerslarge-scaleout: 2 large workersEfficiency is speedup divided by the worker CPU-budget increase; it is not measured CPU utilization. Values slightly above 100% are not evidence of reliably superlinear scaling from this single deployment round.
Median query latency, in seconds:
Observations:
Historical CPU, memory, and network inspection
Historical cAdvisor metrics were recovered after teardown and matched to all four measured distinct executions per shape. CPU and network figures use one-minute rates sampled every 15 seconds, restricted to query start +60 seconds through query end -15 seconds to exclude preceding-query overlap. Samples overlap and are not independent trials. Effective CPU quotas were checked against container quota/period metrics.
CPU-dependent concurrency is a confounding factor
The pinned Trino build defaults
task.max-worker-threadstoRuntime.availableProcessors() * 2andtask.min-driversto twice that value. Its enabled thread-per-driver scheduler uses these for execution slots and its global leaf-driver target. Pinned task configuration, scheduler implementation.Assuming the JVM detected the configured quotas, the expected aggregate defaults are:
These are source-derived expectations, not captured runtime settings or counts of simultaneous S3 requests. They provide a plausible explanation for similar throughput at equal CPU budgets and approximately doubled throughput at the larger budget: the experiment changed CPU, memory, and default execution concurrency together.
Conclusion: the evidence does not establish sustained CPU-quota saturation as the bottleneck. Read/scan concurrency and waiting between CPU bursts deserve investigation. Neither a hard network limit nor a specific GC, exchange, or hashing bottleneck has been demonstrated.
Recommended next experiment: keep CPU, memory, worker shape, dataset, and cache policy fixed; explicitly increase execution/leaf-driver concurrency. Capture effective settings, running/blocked drivers, operator CPU and blocked time, physical-read and exchange statistics, GC, and container telemetry. If throughput improves while spare CPU is used, concurrency tuning may recover some of the scaling gain without doubling resources. This experiment has not been run.
The completed run did not retain Trino server query IDs, operator profiles, or GC statistics. Its
server_metrics.promartifact contains harness latency/request/row metrics, not Trino server telemetry. A targeted diagnostic execution is still required to identify the precise bottleneck.