Skip to content

perf(archive): prove current full-corpus ingest and rebuild bounds #2391

Description

@Sinity

Outcome

Current Polylogue master can ingest, replay, repair, and rebuild the real archive within explicit time, memory, WAL, cancellation, restart, and time-to-searchable bounds. The result is a reproducible benchmark/receipt, not another optimization based on stale measurements.

Why this issue remains open

The original June incident exposed real pathologies, including slow full-ingest chunks, multi-gigabyte WAL growth, retained RSS after interruption, and weak stage visibility. Since then, raw replay, authority reconciliation, planner statistics, derived rebuilds, FTS finalization, checkpointing, and repair paths have changed substantially.

Therefore:

Historical timings are regression evidence, not a current performance diagnosis. Remeasure current code before admitting another fix.

Benchmark matrix

Run against a declared immutable archive snapshot and record:

  • hardware, code commit, schema versions, archive row/byte counts, and enabled optional lanes;
  • clean full replay from retained raw authority;
  • resumable restart after interruption at representative stages;
  • live catch-up of changed large provider files;
  • derived insight/thread/run/delegation rebuild;
  • FTS/trigram/vector finalization where enabled;
  • time to first searchable page and final readiness;
  • peak RSS, WAL, DB growth, CPU, open files, and stage durations;
  • cancellation/deadline behavior and retained resume state;
  • parity and debt before/after.

Acceptance criteria

  • One command or documented command sequence produces a machine-readable benchmark receipt and preserves logs/artifacts.
  • Full replay and derived rebuild commit/checkpoint in bounded resumable windows; interruption does not discard all prior completed work.
  • Work units are bounded by meaningful size/row/message budgets rather than only fixed file/session counts.
  • Restart resumes from durable progress and converges to the same parity result as an uninterrupted run.
  • Peak RSS and WAL stay inside declared operator limits, or a precise stage is named as the remaining blocker.
  • Live append/catch-up does not repeatedly reparse an entire giant file when a valid bounded continuation exists.
  • Time-to-searchable and final-readiness are reported separately.
  • The receipt distinguishes exact parity from deferred optional work and remaining debt.
  • No performance change lands solely because the historical June profile suggested it; each fix cites a reproduced current bottleneck.

Tracker authority

Non-goals

  • No generic micro-optimization campaign.
  • No benchmark against only synthetic fixtures.
  • No requirement that every optional derived lane block initial queryability.
  • No weakening parity, evidence authority, or restart safety to improve headline throughput.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:daemonDaemon and live service runtimearea:storageStoragetheme:operationsOperational health, backup, alerts, maintenancetype:trackingUmbrella issue coordinating multiple items

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions