Skip to content

A few improvements to ClickBench performance test - #94334

Merged
alexey-milovidov merged 12 commits into
masterfrom
add-cb-ci
Jan 19, 2026
Merged

alexey-milovidov merged 12 commits into
masterfrom
add-cb-ci

Conversation

@rienath

@rienath rienath commented Jan 15, 2026 •

Copy link
Copy Markdown
Member
  1. Renamed website.xml → clickbench.xml. We've had ClickBench in our CI for a long time, but the test name wasn't immediately recognisable. Now when it fails, the name rings a bell.

  2. A lot of queries have slightly changed since the test was created. This PR updates all queries to match our official query list.

  3. Benchmarks will have a limit of 8 seconds per query rather than 2 as with normal tests.

  4. Previously, some queries ran on hits_10m, others on hits_100m, and some on both. This is no longer necessary and simplifies the mapping between CI output and ClickBench query numbers.

  • Before: CI failure website #25 → ClickBench Q15 on hits_10m 😵‍💫
  • After: CI failure clickbench #25 → ClickBench Q26 (off-by-one since CI is 0-indexed)

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Version info

  • Merged into: 26.1.1.672

@clickhouse-gh

clickhouse-gh Bot commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [86d0fe6]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 15, 2026
@rienath

rienath commented Jan 15, 2026

Copy link
Copy Markdown
Member Author

Here's stability of website.xml on master over the last week (we don't have more data). For future reference

image image

@rienath
rienath requested a review from Copilot January 15, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes and simplifies the ClickBench performance test configuration by renaming the test file for better discoverability, updating all queries to match the official ClickBench specification, and standardizing test execution to use only the hits_100m_single table.

Changes:

  • Renamed test file from website.xml to clickbench.xml for clearer test identification in CI
  • Updated all 43 queries to match the official ClickBench query list with modern SQL syntax
  • Standardized all queries to run on hits_100m_single table only, removing the mixed hits_10m_single/hits_100m_single approach

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tests/performance/website.xml Removed old test configuration file
tests/performance/clickbench.xml Added new test configuration with updated queries and simplified table substitution

Comment thread tests/performance/clickbench.xml Resolved
Comment thread tests/performance/clickbench.xml Resolved
Comment thread tests/performance/clickbench.xml Resolved
Comment thread tests/performance/clickbench.xml Resolved
to match hits_10m_single name
@alexey-milovidov alexey-milovidov changed the title Few improvements to ClickBench performance test A few improvements to ClickBench performance test Jan 15, 2026
@rschu1ze

Copy link
Copy Markdown
Member

@rienath How did you create the pretty chart?

@nickitat nickitat self-assigned this Jan 15, 2026
@rienath

rienath commented Jan 16, 2026

Copy link
Copy Markdown
Member Author

@rschu1ze I opened a random dashboard on play, like this one, and added my queries in the following section
image

To generate the queries, I used

import json
config = { "params": {}, "queries": [ { "title": f"ClickBench #{i}", "query": f"SELECT check_start_time::UInt64 as time, test_duration_ms FROM checks WHERE check_start_time >= now() - INTERVAL 14 DAY AND test_name LIKE '%website%#{i}:%old%' AND check_name like '%amd%' ORDER BY check_start_time" } for i in range(67) ] }
print(json.dumps(config, indent=2))

@rienath

rienath commented Jan 16, 2026 •

Copy link
Copy Markdown
Member Author

Unfortunately, our CI only runs a subset of the performance tests. This time, it ran 10/ 43 queries. We see that Q19 is slower than CI wants.

image

This doesn't make the CI red and we have a few long tests anyway, but it would be good to use a smaller dataset there. Here's the speed of all queries when I run them locally. Here's the distribution drawn on https://app.rawgraphs.io/:

viz (1)

Q19 (median 18) is indeed slower than the rest. Q17, Q18, Q29, Q33, Q34, Q35 are also on the slower side. Changing the dataset to hits_10m for them yields the following results and a much tighter distribution:

viz (2)

I will update the benchmark

to keep CI times reasonable
@nickitat

Copy link
Copy Markdown
Member

Longer queries allow for much more reliable detection of the slowdowns. It is totally fine if the query runs for 1.5s. Maybe we just need to split the original set of queries into multiple files to make the script run all of them instead of a random selection.

@rschu1ze

Copy link
Copy Markdown
Member

A related idea is to add a special hack to the performance framework which increases the timeout for a handful of benchmark queries (ClickBench). There are only so many of them.

as we decided to keep longer tests for benchmarks
Although it is fas
t enough and does not need increased time in CI, having all benchmarks in the list is more readable and consistent
as Q29 takes roughly 6 seconds to complete and we want to leave some overhead
@rienath

rienath commented Jan 16, 2026

Copy link
Copy Markdown
Member Author

Thanks for the comments! @rschu1ze I've increased the time limit from 2 to 8 seconds for "benchmark" tests. The only really long query is Q29 that takes a little less than 6 seconds. @nickitat Benchmarks would run all queries defined in the .xml rather than 10 random ones (merged this as part of another PR today, but the idea came from your comment)

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jan 19, 2026
Merged via the queue into master with commit 60b8bdd Jan 19, 2026
128 checks passed
@alexey-milovidov
alexey-milovidov deleted the add-cb-ci branch January 19, 2026 17:11
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog 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.

6 participants