Skip to content

Commit ab7f948

Browse files
authored
Merge pull request #767 from ClickHouse/docs-clickbench
Docs: Clarify README regarding cold runs
2 parents 31edb58 + fbb2415 commit ab7f948

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,16 @@ If a system is of a "multidimensional OLAP" kind, and so is always or implicitly
149149

150150
### Caching
151151

152-
We distinguish three cases:
152+
Each of the 43 queries is run three times.
153+
We distinguish two cases:
153154

154-
1. Hot runs. The database starts and then runs all queries sequentially, with three runs per query.
155+
1. Hot runs. This is the second and third run of each query. As the previous first run is supposed to populate all database and operating system caches, the two hot runs are expected to be the fastest runs overall.
155156

156-
2. Cold runs. Before each of the three runs per query, all caches are cleared. This means a) clearing the operating system page cache and b) all caches within the database, including buffer pools. Many databases provide commands to clear internal caches. However, for fairness towards systems which don't offer such statements, it is required to _restart_ the database.
157+
2. Cold runs. There are two sub-cases.
157158

158-
3. Lukewarm runs. Similar to cold runs but _only_ the operating system page cache is cleared before each query. This is what ClickBench historically considered as "cold run", benefiting databases with aggressive internal caching. The benchmark is migrating from lukewarm runs to true cold runs (previous case 2.). Submissions that do not properly restart the database-under-test have a tag "lukewarm-cold-run". Please change the script to a true cold run, remove the label, and send a PR against the repository - thanks.
159+
2.a) True cold runs. Before each first run of each query, all operating system caches (page cache) and database caches (e.g. buffer pools) are cleared. Some databases provide commands to clear internal caches. For fairness towards databases which do not offer such statements, it is _required_ to restart the database before the first run of each query. Databases (or actually: data processors) which do not persist as a background process, e.g. [clickhouse-local](https://clickhouse.com/docs/operations/utilities/clickhouse-local), fulfil this requirement implicitly. It is still needed to clear the page cache before each first query to qualify as a true cold run.
160+
161+
2.b) Lukewarm cold runs. Compared to true cold runs, _only_ the operating system page cache is cleared before each first run of each query. This is what ClickBench historically considered as "cold run", benefiting databases with extensive internal caching. Submissions that do not restart the database _must_ have a label "lukewarm-cold-run" in their result file. We encourage contributors to migrate submissions from lukewarm to true cold runs.
159162

160163
General rules regarding caching:
161164
- Query result caches should be disabled.

0 commit comments

Comments
 (0)