Repository navigation
Lower test concurrency on the azure ASan functional shard - #107441
alexey-milovidov merged 1 commit into
Conversation
The "Stateless tests (arm_asan_ubsan, azure, parallel)" shard fell through to the default worker count (cpu_count() * 0.6, ~19 on the ARM_MEDIUM runner). It got no memory-aware concurrency reduction, unlike MSan and DatabaseReplicated (both cpu_count() * 0.4). That shard runs only under ASan, where each query's resident set is roughly tripled, and azurite (the local Azure blob emulator) adds further pressure. With ~19 heavy queries co-scheduled, the aggregate hits the shared server memory cap (current RSS: 53.69 GiB, maximum: 53.69 GiB) and the OvercommitTracker starts stopping queries across all concurrent tests at once, knocking out several unrelated tests in the same ~30s window. CIDB shows this cascade over the last ~28 days excluding the 2026-06-09/06-10 Azure outage days: 187 OvercommitTracker/RSS-cap failures across 148 distinct tests and 59 PRs (00084_external_aggregation alone on 6 PRs). Apply the same lever already accepted for MSan in commit e1705ed ("ci: reduce number of tests in parallel for MSan, from 19 to 12"): set the azure FT worker count to cpu_count() * 0.4, so peak concurrent RSS stays under the cap. On a 32-core runner this is 19 -> 12 workers. No other shard is affected; the azure sequential shard (already on the smaller ARM_SMALL_MEM runner) also narrows from 19 to 12, which is harmless for serialized tests. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-1:20260614-161500 |
|
cc @maxknv for CI-infra review: lowers the azure ASan functional shard to |
|
Workflow [PR], commit [536f6a3] Summary: ✅ AI ReviewSummaryThis PR lowers the worker count for the current Missing context / blind spots
Final VerdictStatus: ✅ Approve |
|
Which exact queries were heavy? So 19 of them break the barrier? |
|
Not a single heavy query, it is the aggregate of ~19 concurrent ASan workers. CIDB on No single query gets near that cap. Across every killed query in those logs the query's own ask is median 0.76 GiB, p90 4.70 GiB, max 7.39 GiB, and 0 ask >= 10 GiB. The barrier is broken by the sum, not by one query. The genuinely heavy ones (5-7 GiB peak each, ASan roughly 3x RSS): The kill is then shared: 86.6% of the 149 affected tests appear exactly once. They are not heavy, they are whatever the OvercommitTracker happened to stop when total RSS hit the cap ( So yes, the count is the lever, not one query. Lowering 19 to 12 ( Reports:
|
|
How much memory do TPC-H and TPC-DS queries spend? |
|
Concrete per-query peaks on that shard (each query's own MemoryTracker at the moment the OvercommitTracker selected it as the victim): TPC-DS, the heavy ones:
TPC-DS, light (selected while small, i.e. innocent victims):
TPC-H:
The stateless test profile caps every query at Sample report (q61, 5.07 GiB, total-cap kill): https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104545&sha=d92a147f5c1b1a8bd0389b804f8ed18659bff00e&name_0=PR&name_1=Stateless%20tests%20%28arm_asan_ubsan%2C%20azure%2C%20parallel%29 |
|
@groeneai, using certain disk-spill settings, can we make some of these queries lighter, ideally under 1 GB? |
|
Partly. Disk-spill only helps the GROUP BY / sort-dominated queries, which is about half of the heavy set. Can be brought near or under 1 GiB with
Cannot be capped this way:
One caveat on the mechanism: the OvercommitTracker stops whatever is co-scheduled when the server total crosses 53.69 GiB, and 86.6% of the affected tests are innocent victims selected while small. Spilling the aggregation tail lowers how often the total crosses, but the non-spillable hitters (01603 at 7.4 GiB, the joins) remain. So disk-spill is a useful complementary patch on the aggregation subset, not a full replacement: Happy to add the external-group-by/sort settings to the TPC aggregation queries if you want that in addition to, or instead of, the concurrency change. |
|
@groeneai, send a follow-up PR that will enable disk spill for GROUP BY, ORDER BY, and grace hash join in TPC-H and TPC-DS tests, aiming to lower memory usage under 1 GB whenever possible. This change will also improve our test coverage. |
|
Follow-up PR: #107461. It enables external GROUP BY, external sort and grace hash join in the TPC-H and TPC-DS functional tests. Peak memory on SF1 (debug), before then after:
Most heavy queries drop well under 1 GiB. TPC-DS q23 holds most of its memory in The settings are in the shared |
Related: #107414
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The
Stateless tests (arm_asan_ubsan, azure, parallel)shard fell through to the default worker count (cpu_count() * 0.6, ~19 on the ARM_MEDIUM runner) with no memory-aware reduction, unlike MSan and DatabaseReplicated (both* 0.4).That shard runs only under ASan (resident set roughly tripled) plus azurite. With ~19 heavy queries co-scheduled the aggregate hits the shared server cap (
current RSS: 53.69 GiB, maximum: 53.69 GiB) and the OvercommitTracker stops queries across all concurrent tests at once, knocking out several unrelated tests in one ~30s window.CIDB over the last ~28 days, excluding the 2026-06-09/06-10 Azure outage days: 187 OvercommitTracker / RSS-cap failures across 148 distinct tests and 59 PRs (
00084_external_aggregationalone on 6 PRs).Fix: apply the same lever already accepted for MSan (commit e1705ed, "reduce number of tests in parallel for MSan, from 19 to 12") to the azure ASan shard,
cpu_count() * 0.4. On a 32-core runner this is 19 -> 12 workers; peak concurrent RSS stays under the cap. No other shard is affected.Version info
26.6.1.794