Skip to content

perf: merge Parquet by column, bound pressured merges, and free rollup gates - #315

Merged
vishr merged 2 commits into
mainfrom
perf/compaction-throughput
Oct 15, 2026
Merged

vishr merged 2 commits into
mainfrom
perf/compaction-throughput

Conversation

@vishr

@vishr vishr commented Oct 15, 2026

Copy link
Copy Markdown
Member

Summary

An 8-vCPU benchmark of v2026.10.5-alpha (Fanout and telemetrygen on separate ccx33s) failed its gates. A compaction merge of 128 log batches ran on one core at about 52k rows/s, while logs arrived at 250-380k/s. Generation-0 debt reached the hard limit, ingest stopped for about 100 s, and generators timed out on their export deadline. The sustained mixed phase spent 152 of 300 s in backpressure.

  • Column-wise merge. Compaction merges each physical column with one shared row schedule. Span sort keys are merged once and drive it. Up to eight columns decode, encode and compress concurrently, with no wide-row conversion.
    • Logical values, physical schema, row groups, footer bounds and the trace index are unchanged. The index is byte-identical.
  • Bounded merges under pressure. While reclaimable debt is at or above half the limit, a generation-0 merge takes at most 4M rows, so debt retires in steps of seconds. Inputs above half that ceiling no longer count toward blocking debt, which keeps the bound deadlock-free.
  • No gate parking. Service, edge and version passes release the analytical gate when background Parquet admission is unavailable, and retry on their cadence. Before, they held it for up to 15 s while anomaly persistence has a 10 s budget.
  • Service rollup bounds. The service rollup materialises its affected keys once and binds exact native event-time bounds instead of scalar subqueries (audit F1).

Local measurements on 6.4M-row realistic merges, idle:

Signal Before After
Logs 575k rows/s 2.36M rows/s
Metrics 586k rows/s 2.42M rows/s
Spans 233k rows/s 794k rows/s

Other local measurements:

  • Pressured 4M-row merges finish in 2.8-7.4 s with six cores busy.
  • A rewrite model of 1B rows changes rewritten rows by at most 1.2%.
  • On a dense 15M-row minute, the service rollup went from 2.9 s to 0.5 s, and peak native memory from 954 MiB to 52 MiB.
  • An anomaly write that failed at 50 ms while publication was pending now succeeds in 10 ms.

No configuration, format, physical-schema or durability change.

Test plan

  • just check
  • just test-race
  • Native verification of full-scale merge outputs:
    • all columns decoded;
    • span ordering and index ranges;
    • column parity and footer-bound parity with the previous merge.
  • Tests for:
    • the pressured bound, oversized inputs and deadlock freedom;
    • nonblocking admission skips and retries;
    • service bounds with late arrivals, signed bounds and empty sets.
  • Codex adversarial review: approved.
  • 8-vCPU benchmark after release

https://claude.ai/code/session_01XA52nWyQ3R5f5kK8kjpAQW

vishr added 2 commits October 15, 2026 12:44
…p gates

An 8-vCPU benchmark of v2026.10.5-alpha failed its gates. A compaction
merge of 128 log batches ran on one core at about 52k rows/s, against
250-380k logs/s of ingest. Generation-0 debt reached the hard limit, ingest
stopped for about 100 s, and generators timed out.

- Compaction merges each physical column with one shared row schedule.
  Span sort keys are merged once and drive the schedule. Up to eight
  columns decode, encode and compress concurrently, with no wide-row
  conversion. Locally, 6.4M-row merges went from 575k to 2.36M rows/s for
  logs and metrics, and from 233k to 794k for spans. Logical values,
  physical schema, row groups, footer bounds and the trace index are
  unchanged.
- While reclaimable debt is at or above half the limit, a generation-0
  merge takes at most 4M rows, so debt retires in steps of seconds. Inputs
  above half that ceiling no longer count toward blocking debt.
- Service, edge and version passes no longer park the analytical gate:
  when background Parquet admission is unavailable they release it and
  retry on their cadence.
- The service rollup materialises its affected keys once and binds exact
  native event-time bounds. A dense 15M-row minute went from 2.9 s to
  0.5 s and from 954 MiB to 52 MiB peak.

Claude-Session: https://claude.ai/code/session_01XA52nWyQ3R5f5kK8kjpAQW
TestAnalyticalRollupsReleaseGateWhenPublicationBlocksAdmission bounded
RecordAnomalies by 50 ms. On a CI runner under -race the INSERT itself
took longer and was interrupted, although the gate was not parked. The
successful paths in both admission tests now allow 5 s, which still fails
long before the former 15-second admission lease. The stats timeout case
keeps its short deadline.

Claude-Session: https://claude.ai/code/session_01XA52nWyQ3R5f5kK8kjpAQW
@vishr
vishr merged commit 52888c7 into main Oct 15, 2026
14 checks passed
@vishr
vishr deleted the perf/compaction-throughput branch October 15, 2026 20:35
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.

1 participant