Skip to content

perf(storage): encode canonical topology and adjacency on admission lanes #1600

Description

@DecisionNerd

Problem

After the #1448 shaping lanes (#1599), one complete S18 ingest on 8 cores reaches 1.19× its 1-core throughput and 0.97 effective cores. The agreed #1448 core-use criterion is at least 2.0 on both.

Canonical encoding is now the largest region still on one core. Median region wall at 8 cores (three runs, candidate e0746156, evidence docs/development/evidence/core-scaling-1448/candidate/):

Region Wall CPU / wall
complete ingest 29.0 s 0.97
validate/seal/canonical_encoding 8.30 s 0.90
…/canonical_encoding/adjacency_encoding 4.46 s 0.85
validate/seal/shaping/shape_routing 4.52 s 0.83
validate/append 4.19 s 0.86
commit/publish 2.50 s 0.53

Two structural limits apply:

  • Admission. ADR 0047 gives construction compute_threads − reserve lanes. At 8 usable cores that is min(8, ceil(8 / 2)) − 1 = 3 lanes plus the coordinator.
  • Model, not measurement. Even perfect 4-way encoding would save at most about 6 s at 8 cores, which gives about 1.3×. Reaching 2× also needs routing and append off the coordinator. Encoding is the largest single step and the next bounded one.

Scope

Encode the canonical topology and the adjacency index on admission lanes. The coordinator keeps the order of every published artifact and of every digest over it.

Published artifacts stay byte-identical (ADR 0038). The determinism suite's encoded digests do not move at any lane count.

Acceptance criteria

Relationships

Native sub-issue and blocker of #1448 (its core-use criterion). #1465 evaluated a DataFusion seam for encoding and found it 7.6% slower; this issue uses the retained machinery with lanes (ADR 0046). Routing and append parallelism are further candidates if this does not reach the criterion. Do not add them here.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions