Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/synapse/blob/main/docs/A0_HOST_BOUNDS.md
# synapse
A component of the AienOS ecosystem.
Brought by drakestapleton
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
branch `main` Branches Tags History
`synapse / docs / A0_HOST_BOUNDS.md`
159 lines · 14535 bytes Raw Blame History Source
# A0: Host Bound Probes (Experiment X0)
ADR 0003 section 9 step A0 (issue #21). This step measures the host inputs that the section 6.2 bounds need and that were "not yet measured": memory bandwidth, device read and write bandwidth, and all-core SHA-256 and Ed25519 verification throughput, with an energy preflight. The flush time comes from W1 (Phase 5) and is not measured again. These figures are bound inputs, not targets.
Convention (ADR 0003 P3): fraction of bound reached = bound / measured for times, which is the same as measured / bound for rates. It is at most 1 by construction, and 1 means the work ran at the physical limit. Every fraction below uses this form and also gives the bound, the measured value, and how many times the bound the measurement took.
A rate measured here is never itself the hardware bound: a better workload could exceed it. Measured rates are therefore labelled achieved (lower bound on capability). The physical bounds come from the vendor's published figure or from the device's own link (section 2.1). Where no closed-form limit exists (SHA-256, Ed25519), the input is an implementation reference under the ADR 6.2 replacement rule. `report.json` can only carry those two labels (`BoundInputKind`); any other label fails to load.
## 1. Acceptance and Where It Is Met
ADR 0003 A0 acceptance How it is met Proof
Sealed evidence with instrument, resolution, and raw samples `evidence/a0-host-bounds/`: `protocol.json`, `raw.json` (every timing in ns, every work count, every meter reading in µJ, `/proc/loadavg` at each run's edges), `report.json`, `SHA256SUMS`. `raw.json` names the clock (`CLOCK_MONOTONIC`, 1 ns resolution from `clock_getres`) and the meter (1 mJ step, 0.1 s update, 10 Hz sampling) `sha256sum -c SHA256SUMS`
Repetitions and spread statistic fixed before the runs `protocol.json` fixes 7 repetitions, median, range (min and max), the bound statistic (highest rate any repetition reached), and every probe size. It was committed and pushed (`f24a5d6`, 18:18:18 UTC) before the run started (18:18:25 UTC). `raw.json` carries the protocol's SHA-256, and verification refuses a changed protocol, a dropped or extra repetition, or a run whose threads or work differ from the protocol tests `verify_refuses_a_protocol_changed_after_the_run`, `verify_refuses_dropped_extra_or_resized_repetitions`
Someone holding only the sealed raw data recomputes every reported figure exactly `raw.json` holds integers only; `report.json` is a pure function of the protocol and raw bytes (formulas in section 3). `synapse-bench bounds-verify` recomputes it and compares byte for byte, then checks every file listed in `SHA256SUMS` (and requires the protocol, raw and report files to be listed). This is a consistency check only: anyone can edit `raw.json` and regenerate the report and checksums. Authenticity comes from the git history and review of the commit that sealed the files. A repetition marked `error` is excluded, counted in `report.json` (`excluded_repetitions`, 0 here), and protocol v1 allows none, so any excluded repetition refuses the report `red-green/tamper.txt`, tests `verify_*`, `errored_repetitions_*`
With the energy device hidden, the probe refuses with `INSTRUMENT_UNAVAILABLE` Energy preflight runs first: no `aien_spbm` device, a counter that does not advance, an unreadable channel, or a set overflow flag refuses with `INSTRUMENT_UNAVAILABLE`; nothing is written and no probe runs `red-green/hidden-meter.txt`, tests `hidden_energy_device_*`, `frozen_overflowed_or_missing_counters_refuse_preflight`
Red before green: the 19 tests were committed first against a skeleton whose bodies were stubs (`aadd9e6`); 18 failed for the stated reason (`red-green/red.txt`). The 19th, an advancing counter passing preflight, is the control against a preflight that refuses everything, so it passes against a stub that accepts everything. The implementation (`00c3f1f`) turns all 19 green (`red-green/green.txt`). The only later change to the test file before the run adds two load-average fields to a test fixture.
Review round (after the run, raw data unchanged): three tests were added first (`772243b`) and failed for the stated reasons (`red-green/review-red.txt`): measured rates still labelled "hardware measurement", no `excluded_repetitions` count, and consistently edited evidence still verifying because `SHA256SUMS` was never read. The fix turns all 22 green (`red-green/review-green.txt`). `report.json` was then reissued from the unchanged `protocol.json` and `raw.json` with `synapse-bench bounds-report` (report schema v2: the new labels and the excluded count; every figure is identical).
## 2. Results
Host: GB10, 20 CPUs (10 Cortex-X925, 10 Cortex-A725), 127,598,752 KiB memory, kernel 7.0.0-1019-nvidia, ext4 on `/dev/nvme0n1p2`. Binary built from `f24a5d6`. Seven repetitions, probes interleaved in the order of the table inside each repetition.
Probe Threads Achieved (max rate) Median Range Package W (median) Package J per unit (median) Above idle (median)
Idle (2 s sleep) 0 28.59 (23.25 to 33.32)
Memory read 20 103.80 GB/s 102.82 GB/s 100.27 to 103.80 61.58 0.601 nJ/B 0.319 nJ/B
Memory copy (read plus written) 20 122.02 GB/s 120.90 GB/s 116.37 to 122.02 59.35 0.494 nJ/B 0.277 nJ/B
Device write, O_DIRECT, through `fdatasync` 8 10.92 GB/s 3.665 GB/s 1.558 to 10.92 29.58 9.23 nJ/B 0.690 nJ/B
Device read, O_DIRECT 8 12.25 GB/s 11.79 GB/s 10.24 to 12.25 30.61 2.62 nJ/B 0.299 nJ/B
SHA-256, `sha2` crate as built 20 6.167 GB/s 6.054 GB/s 5.676 to 6.167 50.90 8.35 nJ/B 3.84 nJ/B
SHA-256, Armv8 SHA-2 instructions 20 22.25 GB/s 20.48 GB/s 20.13 to 22.25 59.46 2.90 nJ/B 1.50 nJ/B
Ed25519 verify, `ed25519-dalek` 20 395,192 /s 392,552 /s 298,004 to 395,192 55.55 140.9 µJ 77.2 µJ
GB means 10^9 bytes. Every exact value is in `report.json`; the table rounds them.
Flush, from W1 (`evidence/phase5-group-commit/floor.json`, SHA-256 `9c30eddf…5ccef`, pinned in the protocol), p50: overwrite of already written space plus `fdatasync` 1.106 ms (4 KiB), 0.903 ms (64 KiB), 0.805 ms (1 MiB); `O_DIRECT | O_DSYNC` 4 KiB overwrite 1.606 ms; append 4 KiB plus `fdatasync` 3.703 ms.
### 2.1 Physical bounds and fraction of bound reached
Achieved rates (the highest rate any repetition reached, so the host demonstrably did at least that) against the physical bound for the same hardware:
Input Achieved (lower bound on capability) Physical bound Source of the bound Fraction of bound reached
Memory read, every core 103.80 GB/s 273 GB/s NVIDIA DGX Spark specification: "128 GB LPDDR5x, coherent unified system memory", "256-bit", "273 GB/s" (https://www.nvidia.com/en-us/products/workstations/dgx-spark/