Skip to content

Raise per-worker memory budget for --dist=each integration checks - #107529

Merged
Algunenano merged 1 commit into
ClickHouse:masterfrom
Algunenano:fix-flaky-integration-dist-each-oom
Jun 17, 2026
Merged

Algunenano merged 1 commit into
ClickHouse:masterfrom
Algunenano:fix-flaky-integration-dist-each-oom

Conversation

@Algunenano

@Algunenano Algunenano commented Jun 15, 2026 •

Copy link
Copy Markdown
Member

The flaky and targeted integration checks run pytest with --dist=each, so every
xdist worker runs the full set of changed modules concurrently, each in its own Docker
cluster, instead of splitting modules across workers like the --dist=loadfile runs.

The worker count still used the loadfile budget of 11 GB per worker. A PR that changes
many memory-heavy modules (Spark JVMs plus several Address Sanitizer server clusters)
could therefore start more concurrent workers than fit the container memory cgroup. The
kernel OOM killer then fired and the OOM in dmesg check failed the job, even though the
victim picked by oom_score_adj was an unrelated Spark java process rather than the
real consumer (the ClickHouse servers).

This uses a separate, larger memory budget of 20 GB per worker for the --dist=each
path. On a 16 vCPU / 60 GB runner it drops the flaky check from 3 to 2 workers, cutting
peak memory by about a third while keeping a meaningful flakiness signal (sequential
repeats stay at max(3, workers)). The --dist=loadfile runs are unchanged.

CI report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106855&sha=42de24e863b6181d0e1c88201f4acbf83905922d&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20flaky%29

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Version info

  • Merged into: 26.6.1.905

Flaky and targeted integration checks run pytest with --dist=each, so every
xdist worker runs the full set of changed modules concurrently, each in its
own Docker cluster, instead of splitting modules across workers like the
loadfile runs. The worker count still used the loadfile budget of 11 GB per
worker, so a PR changing many memory-heavy modules (Spark JVMs plus several
ASan server clusters) could start more concurrent workers than fit the
container cgroup. The kernel OOM killer then fired and the `OOM in dmesg`
check failed the job.

Use a separate, larger memory budget of 20 GB per worker for the --dist=each
path. On a 16 vCPU / 60 GB runner this drops the flaky check from 3 to 2
workers, cutting peak memory by about a third while keeping a meaningful
flakiness signal (sequential repeats stay at max(3, workers)).

CI report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106855&sha=42de24e863b6181d0e1c88201f4acbf83905922d&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20flaky%29

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a5098b8]

Summary: ✅


AI Review

Summary

This PR raises the automatically computed memory budget for integration flaky and targeted jobs that run pytest with --dist=each, lowering worker count when memory is the limiting resource while leaving --dist=loadfile jobs unchanged. I found no correctness or CI-safety issues in the current diff.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 15, 2026
@Algunenano
Algunenano added this pull request to the merge queue Jun 17, 2026
Merged via the queue into ClickHouse:master with commit 6b26e8e Jun 17, 2026
166 checks passed
@Algunenano
Algunenano deleted the fix-flaky-integration-dist-each-oom branch June 17, 2026 09:03
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants