Skip to content

[experiment] ci(backend): stop ClickHouse logging every test query - #129369

Closed
sentry-junior[bot] wants to merge 1 commit into
ci/add-xdist-worker-backend-testsfrom
ci/xdist-exp-clickhouse-no-query-log
Closed

sentry-junior[bot] wants to merge 1 commit into
ci/add-xdist-worker-backend-testsfrom
ci/xdist-exp-clickhouse-no-query-log

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Do not merge. A stacked experiment on #129338 with 4 workers.

ClickHouse uses about 0.4 cores during tests. Its own queries account for a bit over half of that, about 8k per shard, mostly test-reset truncates and inserts. The rest is background work, including writing a log row and profiler samples for every query.

This adds a users.d profile that turns off log_queries, processor profiles and the query profiler, then reloads the config. No restart is needed. A final step counts the query_log rows written, to show whether the setting reached the Snuba connections. Compare the ClickHouse CPU-seconds in the resource-usage artifacts against #129338.

via @joshuarli.

--

View Session [Sentry]

…test query

Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
@sentry-junior sentry-junior Bot added Scope: Backend Automatically applied to PRs that change backend components Trigger: Override Selective Testing Run the full test suite; necessary in cases where selected tests are flaky due to reshuffling labels Oct 30, 2026
@sentry-junior

sentry-junior Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Result: the setting didn't take effect for Snuba's queries. query_log still recorded about 23k rows per shard, probably because Snuba's connections were opened before the change. ClickHouse CPU went from 0.382 to 0.373 cores, which is noise. Making this work would need a ClickHouse restart before the per-worker bootstrap, and at most about 0.15 cores is in play. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Trigger: Override Selective Testing Run the full test suite; necessary in cases where selected tests are flaky due to reshuffling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant