Repository navigation
Write the number_formatting_formats perf test output to /dev/null - #127695
alexey-milovidov merged 1 commit into
Conversation
Queries #0-ClickHouse#11 truncated and rewrote a 30-349 MB file on the runner's disk in every measured run. On master CI their per-run client time correlates with OSIOWaitMicroseconds at 0.94-0.999 and not with CPU time, and the first measured runs are up to 3x faster than the later ones, so the queries timed the disk instead of the formatting. Use a File table on '/dev/null', like select_format, writing_valid_utf8 and formats_hits_write: the same formatting and File sink run, nothing is written to the page cache. engine_file_truncate_on_insert is a no-op on '/dev/null', and dropping it also gives the queries new display names, so they no longer inherit the learned thresholds of the old disk-bound queries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own review (1 nit).
|
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261024-064500 |
|
cc @egor-click, could you review this and add the |
|
Workflow [PR], commit [bfc2afe] Summary: ✅
AI ReviewSummaryThe change directs queries #0–#11 in Final VerdictStatus: ✅ Approve |
ab3de7d
Related: #100759
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The
number_formatting_formatsperformance test writes the output of queries #0-#11 to/dev/null, so these queries time the formatting instead of the runner's disk.Description
number_formatting_formatsis the noisiest test in the #100759 report: on master from 2026-10-22 to 10-24, 344 of 2240 query-runs were over the report's floors, 29-45% for #0, #1, #2, #6 and #7. Example: arm_release 5/6, #0unstable.Queries #0-#11 insert 10M numbers into
File(<format>)withengine_file_truncate_on_insert = 1, so every measured run truncates and rewrites the same 30-349 MB file on the runner's disk. Inquery_metric_runs_v1, per-run time correlates withOSIOWaitMicrosecondsat 0.94-0.999, while the coefficient of variation of CPU time is 3-8%. The first measured run is up to 3x faster than the later ones (#1, amd: 0.096, 0.302, 0.303, 0.298, 0.298 s, with 0.12 s of CPU time and 79 MB written in every run).This writes them to
File(<format>, '/dev/null'), likeselect_format,writing_valid_utf8andformats_hits_writedo, and drops the truncate setting, which does nothing on/dev/null. The formatting and the File sink are unchanged. The measured runs no longer copy the output into the page cache or wait for the disk. The new query texts also reset the learned thresholds of #0-#11, which were built from that noise (max_stat_thresholdup to 2.31). #12/#13 append without truncating, are stable and stay unchanged. Their table isFile(TabSeparated)because its create query uses{format}.Validation: I ran
perf.pywith the official master release build, both servers pinned to 8 cores withmax_threads = 8and data on EBS. Old test: 6 and 9 of 24 per-server series of #0-#11 start fast (first run below 0.85 of the median) in 2 runs. New test: 0 of 72 in 3 runs.OSWriteBytesis 0 in every new run, compared with the full output size in every old run. No query is over the floors in more than one of the 3 runs. #0-#8 now take 20-55 ms.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127695]
Version info
26.11.1.745-master(included in26.11and later)