ClickHouse: Cold runs preload data into memory before the timer
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 領域
- databases, performance
研究方向
先閱讀 README.md 中對 true-cold 的定義,以及 ClickHouse/install 的 startup 註解。追蹤 startup 載入與快取清除在 benchmark 流程中是如何表示的。只有在明確決定 cold-run 策略,且 benchmark 行為與文件一致後,才算完成。
由索引模型根據 Issue 內容生成。
描述
Commit 7c1f7a3291521738a7731af38c994debb1ea3b1e enables preloading of the primary key on ClickHouse startup.
Quoting clickhouse/install:
# Force synchronous startup loading so the cold timer doesn't catch
# work that should have been amortized into ./start.
#
# Two independent layers of laziness contribute to the cold-query floor:
#
# 1. async_load_databases (server-level): with the default 1, the server
# binds its listen port and answers SELECT 1 before user databases
# have finished loading. ./check passes, then the first query stalls
# waiting for the part loader.
#
# 2. primary_key_lazy_load and columns_and_secondary_indices_sizes_lazy_calculation
# (MergeTree-level): even after parts are loaded, the in-memory
# primary key and the per-column .size streams are populated lazily
# on first query. With ~25 parts × ~80 columns × multiple metadata
# files per column that's >1.8k file opens on the first query path,
# contributing several hundred ms even on local NVMe.
#
# Both are eager-load toggles, not caching shortcuts: the same I/O
# happens either way, just before query timing instead of during it.
# Together they brought Q40 cold from ~3 s to ~1.5 s on c6a.4xlarge.
README.md defines true cold runs differently:
2.a) True cold runs. Before each first run of each query, all [...] database caches (e.g. buffer pools) are cleared.
In the current configuration, ClickHouse pre-warms the primary key data at startup, which defeats the clearing of all database caches. The measured cold runs times aren't truly cold anymore. While size-calculations might be considered metadata, primary key data is definitively data that's also queried by the benchmark queries.
I'm not sure there's a good definition which data is fine to be cached for a true cold run and which not.
Two of my suggestions below:
- Include startup times in "true cold" runs. This effectively prevents cheating by preloading data at startup.
- Drop the cold run altogether. "Cold" is clearly different for different systems and does not compare performance apples-to-apples
- 主要語言
- Shell
- 星號
- 1.2k
- 分支
- 330
- 平均合併
- 4 小時 12 分鐘
- 30 天內合併 PR
- 605
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ClickHouse/ClickBench 的其他 Issue
-
難度 5/5 一週以上 新手友好度 35/100
ClickHouse/ClickBench#2650 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 48/100
ClickHouse/ClickBench#2425 ·
維護者通常 1 天內回覆
-
doris-parquet-single fails before measurement on c6a.xlarge: FE cannot commit its 8 GiB initial heap未關閉
難度 4/5 3-5 天 新手友好度 35/100
ClickHouse/ClickBench#2208 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 55/100
ClickHouse/ClickBench#2146 · 1 則留言 ·
維護者通常 1 天內回覆
-
ClickBench+可能已有人在做 @4ertus2 於 77 天前認領。 未關閉
難度 5/5 一週以上 新手友好度 25/100
ClickHouse/ClickBench#1488 ·
維護者通常 1 天內回覆
查看 ClickHouse/ClickBench 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
rossoctl/automation#130 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 72/100
fairagro/m4.2_infrastructure#68 · 3 則留言 ·
維護者通常 1 天內回覆
-
security
難度 2/5 1-3 小時 新手友好度 72/100
Eyevinn/python-runner#38 ·
-
lesson-submission pending-review
難度 2/5 1-3 小時 新手友好度 85/100
Ikalus1988/MisakaNet#4446 ·
維護者通常 1 天內回覆