# HPT triple-mirror read-performance evidence

Status: complete; electronic, A/B target, operator, and USB-publication timing gates passed
Type: evidence
Updated: 2026-07-26
Next Action: none; end-to-end timing and the 4x stretch-goal disposition are recorded in work/evidence/hpt-usb-publication-timing-20260726.md
Campaign Reason: Historical record from campaign 013-close-hpt-media-2-initial-release-qualification; retained independently after campaign closure and requires no separate owner-queue execution.
Campaign: standalone

Parent: work/wp/completed/wp-optimize-hpt-triple-mirror-read-performance.md
Canonical Truth: docs/sd-card-operation-and-recovery.md

## Candidate

- Debug S-record SHA-256:
  `A77ADA66D0678A6C1DC5E3768746F1A4A0028489E10350476C49BD42B31F7211`
- Debug ELF SHA-256:
  `9E6C767260ED18833F07641DC430BBCE4A50D364CF254651B211A69E91BFF3CF`
- Debug map SHA-256:
  `D2D5710D8FE6A1AD9EB85B3DA31B134BDE54D92E875F54536A4E2BBBE53D753A`
- Production-name package: `7520553_SMI_FW_00_05_00`
- Main stack range: `0x2006CFC0` through `0x2006E7C0`
- Rollback scalar-baseline S-record:
  `EAD175B1F20D4E80858B69C4DCBC7A021125BDBE5EA6DD6B8E251ABCA681DA4B`

The implementation does not change HPT media 2.0. Writes remain scalar.
Sequential reads use 16-record lane windows, up to 32 contiguous sectors per
SD command, and continue to validate data, commit, CRC, payload, and quorum
from all available mirror copies. A bounded scalar reread is retained only for
an ambiguous window. Both target traversals reported zero scalar fallbacks.

The graph-cache and export consumers use the same bulk iterator. Export work is
now processed in batches of 64 records with the active owner-loop cadence,
removing the former one-record/10-tick pacing limit. Service 468 exposes cache
time, records, read commands, blocks, maximum command size, bulk refills, and
fallbacks.

## Target identity and preservation

| Control | Assembly / J-Link | Raw CID | Protocol / CID / representative read | Media / system errors |
| --- | --- | --- | --- | --- |
| A | `1751136 / 69664082` | `035344535330384780976F0084018559` | `6 / 1 / 0` | raw HPT ready / `0` |
| B | `1751219 / 69660123` | `035344535330384780976F0085018507` | `6 / 1 / 0` | raw HPT ready / `0` |

Controller B was programmed and read without format, initialization, card
replacement, or powered removal. Its abnormal layout remains visible:
oldest/active first sequences `86/86/1`, current active records
`867/867/952`, and retired segments `2/1/0`.

## Measured cache performance

| Metric | Controller A scalar | Controller A bulk-16 | Controller B scalar | Controller B bulk-16 |
| --- | ---: | ---: | ---: | ---: |
| Records scanned | 927 | 996 | 885 | 944 |
| Traversal | 2.56 s | 1.15 s | 2.30 s | 1.04 s |
| Total cache load | 3.37 s | 1.98 s | 3.12 s | 1.88 s |
| Normalized records/s | 362.1 | 866.1 | 384.8 | 907.7 |
| Normalized traversal gain | baseline | 2.39x | baseline | 2.36x |
| SD read commands | inferred 5,976 | 189 | inferred 5,324 | 168 |
| Command reduction | baseline | 31.62x | baseline | 31.69x |
| Blocks read / max blocks per command | 5,976 / 1 | 5,976 / 32 | 5,324 / 1 | 5,324 / 32 |
| Bulk refills / scalar fallbacks | n/a | 63 / 0 | n/a | 60 / 0 |
| Graph cache ready | yes | yes | yes | yes |

Scalar command counts are inferred from the exact six-sector-per-record
healthy path and B's preserved missing-copy ranges; the scalar image predates
the command counters. Bulk counts are direct target telemetry.

On B, the preceding bulk-8 trial read at most 16 sectors per command and
reported 332 commands, 1.08 s traversal, and 1.88 s total. Bulk-16 reduced the
commands to 168 and traversal to 1.04 s while total remained 1.88 s. This
demonstrates sharply diminishing elapsed-time return beyond the selected
32-sector command size even though command count continues to fall.

## Month-scale result

A normal month is projected as 43,200 one-minute records. Scaling the directly
measured traversal cost and retaining the observed fixed cache overhead gives:

| Control | Scalar projection | Bulk-16 projection |
| --- | ---: | ---: |
| A | 120.1 s | 50.7 s |
| B | 113.1 s | 48.4 s |

These are projections, not month-long target captures. Both are below the
workpackage's 60-second cache target. The measured normalized iterator gain is
2.36x to 2.39x, not the planned 4x acceptance threshold; the physical
sector-transfer/validation time now dominates after a 31x command reduction.
The candidate is therefore being handed to the operator as a measured
performance candidate, not recorded as having met the 4x stretch gate.

Export staging traverses the same retained snapshot through the same measured
iterator. The former fixed pacing alone would require about 72 minutes for
43,200 records. The new 64-record/one-tick batching ceiling is 6,400 records/s,
so the measured SD traversal dominates and predicts approximately 49 to 51
seconds for month-scale staging. This does not include USB filesystem write
and flush time and is not a substitute for the pending bounded operator export.

## Software and build gates

- Bulk/scalar parity model: PASS, including B split-lane reads
  `767/767/852`; modeled commands `4,772` scalar versus `150` bulk.
- Customer export, graph cache, write-cut, and full-address-scrub models: PASS.
- Every repository `script/check-*.ps1` suite: PASS.
- HPT commissioning `95/95`, export `20/20`, graph cache `13/13`,
  full-address scrub `9/9`, SD CID `25/25`, and version-5 routing `11/11`:
  PASS.
- Clean managed Debug rebuild: PASS.
- Production-name packaging: PASS.
- A and B exact-hash programming/verification: PASS.
- A and B CID-linked graph-cache readiness: PASS.
- New dropped logs, mirror mismatches, lost records, or system errors observed
  during the final captures: none.

## Raw target captures

- A:
  `work/evidence/hpt-log-store-circular-mirror/controller-a/read-performance-bulk16-20260726/`
- B:
  `work/evidence/hpt-log-store-circular-mirror/controller-b/read-performance-bulk16-20260726/`
- B bulk-8 comparison:
  `work/evidence/hpt-log-store-circular-mirror/controller-b/read-performance-20260726/`

The compact JSON files are the review surface. Binary J-Link captures remain
supporting evidence and should not be reviewed through per-file diffs.

## Final USB-publication acceptance

Successor image
`A7055AC3F4314EEF440ADA77B76B107C387BDBC68095AD6E1EEBC15D04074FA4`
adds timing through the final USB flush and rename. It passed B first and then
A. B published 1,711 selected records in `2.17 s` HPT staging, `31.71 s` USB
publication, and `33.91 s` total. A published 1,762 selected records in
`2.28 s` HPT staging, `21.24 s` USB publication, and `23.53 s` total.
Both reported zero HPT/USB status, gaps, dropped logs, and bulk fallbacks.

The complete projection and the explicit acceptance of the `2.36x` to `2.39x`
read gain as an unmet but non-blocking `4x` stretch goal are in
`work/evidence/hpt-usb-publication-timing-20260726.md`.
