Repository navigation
Add a performance test for queries that run under a CPU workload - #126515
alexey-milovidov merged 5 commits into
Conversation
…teardown Ordinary (PR / master) runs now use the teardown contract that `--long` runs already have: the drop queries run on every connection that ran setup at the normal end and on every early exit (atexit), only UNKNOWN_TABLE / UNKNOWN_DATABASE count as proof that an object is absent, and `teardown-complete` is printed only when the servers are known clean. The CI loop stops the batch when a test does not print it (a `long` test skipped in an ordinary run created nothing). Before, a timed-run error left the test's objects on the servers and the batch went on, and the ordinary drop loop ignored every drop error on a connection with a tolerated setup failure. A test that creates a server-wide object (a CPU resource) would move every later test of the shard to another execution path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Queries take their threads from a workload with a CPU resource: a wide workload, a narrow one with fewer slots than threads, and two sibling workloads under one slot, where a CPU query runs next to a query that has parked on every throttled read of its set. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uplicate items `remote()` runs with one thread: the only executor thread then holds the CPU slot while it waits on the sockets, so it parks there. With more threads the sockets are polled by a thread without a slot. It runs in the wide workload only, as does the window step (the limit does not bind there). Constants recalibrated (GROUP BY 200M rows, remote() 80M rows, CPU query 400M rows). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each SQL item runs once in the setup, and the setup fails unless every one of them parked in its workload: a query routed off the CPU scheduler is faster, so the comparison alone would report it as an improvement. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… test The setup oracle now also fails when the 4-slot workload runs as many threads as the 64-slot one, and reads only the newest row of each probe, so a failed run does not fail the reruns of the next 10 minutes. The shell item fails unless its CPU query waited for the slot it shares with the neighbour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 3 rounds, 4 findings, the last round clean), plus my own review.
Severity: ❌ blocker / |
|
cc @egor-click, could you review the |
|
Workflow [PR], commit [ea9c1ff] Summary: ✅
AI ReviewSummaryAdds performance coverage for CPU workload scheduling, including parking and contention between sibling workloads. Ordinary performance runs now execute teardown on failure and stop the batch when cleanup cannot be established. Reviewed commit Missing context / blind spots
Final VerdictStatus: ✅ Approve. No required changes identified. |
serxa
left a comment
There was a problem hiding this comment.
Looks like a good starting point for perf test with workload scheduling enabled
|
Make sure it is mergable and tag me |
|
The branch has no conflicts with current master, and master has not touched any of its four files since the base. Style check and Code Review passed. The red The only jobs left are the six |
|
@serxa CI has finished and is green, and the PR is mergeable with no conflicts against master. On the ARM performance runners all six items of the new test passed with diffs within 2.1%, and every run of the five SQL items parked (at least 6 parks per query). |
5042751
Related: #126336
Related: #126133
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Requested in #126336. No performance test used the workload CPU scheduler, so a regression in slot renewal, parking or preemption was invisible to the Performance Comparison.
workload_cpu_scheduling.xmlcreates a CPU resource and workloads, and measures:GROUP BYin a workload with 64 slots and in one with 4 slots for 8 threads;remote()initiator that parks its slot while it waits on the sockets;local_filesystem_read_method = 'read'throttles page cache reads too);parkLeasenever lowersrequested_ns; competing workloads starve for seconds #126133) lengthens its latency.The test fails unless each SQL item parks in its setup run, the 4-slot workload runs fewer threads than the 64-slot one, and the shell item's CPU query waits for its slot, so a query moved off the scheduler cannot pass as a speed-up.
The test creates server-wide objects, so ordinary runs now prove their teardown as
--longruns do: the drop queries run on every exit,teardown-completeis printed only when each succeeded or found its object absent, and the CI loop stops the batch otherwise. Before, a failed run could leak them into the next tests of the shard.Validation, locally with CI's x86 server profile: in two 15-run A/A comparisons every item's median differs by at most 2% and the
stat_thresholdof any 7 consecutive runs is at most 0.08. Master against #126336: the shell item is 30% faster with the fix, the other items within 1.8%.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/126515]
Version info
26.11.1.168-master(included in26.11and later)