Skip to content

Add reproducible reader metrics and query resource evidence for Blog 6 - #44

Merged
tom-clickhouse merged 3 commits into
mainfrom
codex/reader-query-metrics
Oct 13, 2026
Merged

tom-clickhouse merged 3 commits into
mainfrom
codex/reader-query-metrics

Conversation

@tom-clickhouse

@tom-clickhouse tom-clickhouse commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

The continuous-ingestion reader metrics lacked reproducible query-execution CPU and per-query memory evidence for the current Blog 6 visuals. This adds bounded SQL exports, source CSVs, exact runner matching, metric definitions, and dependency-free derivation for 11a and 11b.

The package retains all 958 active executions while the dataset grows to 113.2B quotes on one 16-vCPU / 64-GiB reader. It derives uncompressed GB/s, MB/s per consumed CPU core, query latency, and effective A3/A4 aggregation throughput. The current display adapter applies the accepted centered Gaussian kernel in actual UTC time (sigma one hour, radius three hours), smoothing rate numerators and denominators before division. Original extraction files and the earlier four-panel payload remain preserved.

Both resource bands use CPU during query execution, excluding schedule idle gaps, with headroom as its complement. Memory shows separate average per-query peaks for drill-downs and interactive aggregates. All 958 peaks match uniquely by exact timestamp and query hash, with duration, rows, and bytes cross-checked. Whole-service cache/memory telemetry remains separate evidence.

Validation:

  • Resource/display adapter reproduces byte for byte offline.
  • 958 query CPU observations, 958 matched memory peaks, and 442 joined resource positions retained without new exclusions.
  • Exact 11a/11b JSON payloads match the production visual inputs.
  • All 39 resource-package hashes verify; README links, private-secret scan, and staged patch checks pass.

Start at full-path-realtime/quotes/clickhouse-cloud/results_t2/utilization/reader/query-metrics/README.md, then query-resources/README.md for current display and resource calculations. The newer static-data Hot/Cold scaling experiment for 11c is separate in PR #46.

@tom-clickhouse tom-clickhouse changed the title Add reader query-efficiency evidence for Blog 6 Add reproducible reader metrics and query resource evidence for Blog 6 Oct 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documented reproduction check fails because a committed CPU-throughput CSV is stale, and visual identifiers are inconsistent.

3 open findings
What changed in this PR

Adds reproducible Blog 6 reader-query metrics, resource evidence, and offline derivation for visuals 11a/11b.

Changes:

  • Adds bounded SQL exports and frozen CPU, memory, latency, and throughput evidence.
  • Adds dependency-free derivation and checksum tooling.
  • Documents query-execution resource calculations and smoothing.
File Description
reader/​README.md Links query-level evidence.
query-metrics/​README.md Documents metrics and reproduction.
query-resources/​source-provenance.json Records formulas and sources.
query-resources/​source-manifest.json Pins source hashes.
query-resources/​README.md Explains resource calculations.
query-resources/​FILES.sha256 Lists package checksums.
evidence/​queries/​10-query-peak-memory.sql Exports query memory.
evidence/​queries/​09-query-memory-schema.sql Inspects memory fields.
evidence/​queries/​08-memory-cache-check.sql Checks cache memory.
evidence/​queries/​07-memory-metric-descriptions.sql Exports metric definitions.
evidence/​queries/​06-historical-memory-metrics.sql Queries historical memory.
evidence/​queries/​05-memory-definition.sql Inspects metric schema.
evidence/​queries/​04-capacity.sql Exports service capacity.
evidence/​queries/​03-resource-series.sql Exports resource telemetry.
evidence/​queries/​02-log-coverage.sql Checks telemetry coverage.
evidence/​queries/​01-schema.sql Inspects telemetry schema.
evidence/​effective-aggregation-throughput.csv Freezes aggregation rates.
evidence/​drilldown_20260808T065602Z.jsonl Freezes drill-down runs.
evidence/​data-throughput-per-cpu-core.csv Freezes CPU efficiency.
evidence/​data-processing-throughput.csv Freezes throughput.
evidence/​09-query-memory-schema.csv Records memory schema.
evidence/​08-memory-cache-check.csv Records cache observations.
evidence/​07-memory-metric-descriptions.csv Records metric semantics.
evidence/​04-capacity.csv Records provisioned capacity.
evidence/​02-log-coverage.csv Records log coverage.
evidence/​01-schema.csv Records telemetry fields.
query-resources/​derive.py Generates visual payloads.
query-resources/​config.json Configures 11a/11b outputs.
query-resources/​checksums.py Verifies package hashes.
query-resources/​.gitignore Excludes Python caches.
query-latency.csv Stores latency display values.
queries/​benchmark-drill-downs.sql Captures drill-down queries.
queries/​benchmark-aggregations.sql Captures aggregation queries.
queries/​03-export-profile-stats.sql Exports profile counters.
queries/​02-export-query-log.sql Exports query-log evidence.
queries/​01-discover-benchmark-queries.sql Discovers benchmark hashes.
queries/​00-query-log-fields.sql Inspects query-log fields.
provenance.json Records matching and formulas.
effective-aggregation-throughput.csv Stores aggregation coverage.
derive.py Derives parent metrics.
data-throughput-per-cpu-core.csv Stores CPU efficiency.
data-processing-throughput.csv Stores processing throughput.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +257 to +260
for name, expected in derive().items():
path = HERE / name
if args.check:
assert path.read_text() == expected, f'Stale derived evidence: {path}'

## Current blog values and resource band

Use [query-resources/](query-resources/README.md) for the current two-panel layouts and their **Resource utilization during query execution** bands. It includes extraction SQL/results, all 958 matched per-query memory peaks, CPU during execution with headroom, shared Gaussian display smoothing, exact 16/17 payloads and a dependency-free reproducer. These calculations exclude the idle gaps in the query schedule and preserve the original 16-vCPU / 64-GiB setup.
Comment on lines +1 to +5
# Reader query resources and current 16/17 display data

Visual numbers follow the current Part 6 article. Existing filenames retain their earlier identifiers so reproduction commands and links stay compatible.

This package reproduces the current two reader visuals from the original Run 2 evidence. **16** shows data processing throughput and throughput per consumed CPU core; **17** shows query latency and effective aggregation throughput. Both use the same **Resource utilization during query execution** band.
@tom-clickhouse
tom-clickhouse merged commit e7572d8 into main Oct 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants