|
1 | | -# Axiom OS Benchmark Results |
| 1 | +# Axiom OS — Benchmark Log |
2 | 2 |
|
3 | | -## Platform |
| 3 | +A running record of Axiom OS provenance benchmarks across versions. Older sections are |
| 4 | +kept for history; the most recent version reflects the current design. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## v0.3.0-alpha — Block-level provenance, real hardware |
| 9 | + |
| 10 | +**What changed from v0.2.0.** v0.2.0 measured the *whole-file* provenance design in RDTSC |
| 11 | +cycle counts under QEMU. v0.3.0 introduces *block-level* provenance — a read verifies only |
| 12 | +the 4 KiB blocks it actually touches — and is measured as wall-clock time on **real |
| 13 | +hardware** via the `bench-native` harness. The two versions are not directly comparable |
| 14 | +cycle-for-cycle; the improvement is a change in the **cost model**, not a constant-factor |
| 15 | +speedup: per-read cost moves from O(file size) to O(bytes read). |
| 16 | + |
| 17 | +### Read+verify: whole-file vs. block-level |
| 18 | + |
| 19 | +Median wall-clock time, 7 trials with warm-up: |
| 20 | + |
| 21 | +| File size | Blocks | x86-64 whole (ms) | x86-64 block (ms) | ARM64 whole (ms) | ARM64 block (ms) | |
| 22 | +|-----------|-------:|------------------:|------------------:|-----------------:|-----------------:| |
| 23 | +| 4 KiB | 1 | 0.0035 | 0.0027 | 0.0036 | 0.0037 | |
| 24 | +| 16 KiB | 4 | 0.0094 | 0.0033 | 0.0143 | 0.0037 | |
| 25 | +| 64 KiB | 16 | 0.0339 | 0.0030 | 0.0570 | 0.0037 | |
| 26 | +| 256 KiB | 64 | 0.108 | 0.0027 | 0.228 | 0.0037 | |
| 27 | +| 1 MiB | 256 | 0.555 | 0.0027 | 0.918 | 0.0037 | |
| 28 | +| 4 MiB | 1024 | 2.13 | 0.0026 | 3.72 | 0.0037 | |
| 29 | + |
| 30 | +Block-level verification is constant regardless of file size — **~2.7 µs (x86-64)** and |
| 31 | +**~3.65 µs (ARM64)** — while whole-file verification grows with size. At 4 MiB, block-level |
| 32 | +is **~810× cheaper** (x86-64) and **~1020× cheaper** (ARM64). |
| 33 | + |
| 34 | +### Inline vs. out-of-band detection |
| 35 | + |
| 36 | +Over a 200,000-read trace on a 1 MiB file with one block tampered midway: |
| 37 | + |
| 38 | +| Strategy | Cost | Corrupted reads served | |
| 39 | +|----------|------|------------------------| |
| 40 | +| Inline per-read | 2.66 µs/op (x86-64) | **0** | |
| 41 | +| Periodic scan, 1,000-op interval | 0.80 µs/op amortized | 2 | |
| 42 | +| Periodic scan, 10,000-op interval | 0.080 µs/op | 32 | |
| 43 | +| Periodic scan, 100,000-op interval | 0.008 µs/op | 396 | |
| 44 | + |
| 45 | +Inline enforcement pays a constant per-read cost to guarantee no tampered byte is ever |
| 46 | +returned; periodic scanning is cheaper per operation only by tolerating a proportionally |
| 47 | +larger corruption window. This is a safety/cost trade-off, not a speed result. |
| 48 | + |
| 49 | +### Setup |
| 50 | + |
| 51 | +- **x86-64:** Intel Core i5-5200U, Linux, `rustc` 1.96-nightly |
| 52 | +- **ARM64:** Qualcomm Snapdragon 7 Gen 4 (Cortex-A720 / A520), Termux on Android 16, `rustc` 1.95 |
| 53 | +- **Hash:** `blake3` v1.8.5, runtime SIMD (AVX2 / NEON) |
| 54 | +- **Method:** median ns/op over 7 trials with warm-up; identical block-vs-whole hashing |
| 55 | + logic to the kernel VFS path. The kernel itself is run under QEMU only to confirm the |
| 56 | + proportional-access ratio; all millisecond figures above are from physical hardware. |
| 57 | + |
| 58 | +> Reproduce: build `bench-native` **outside** the kernel tree (it is a `std` crate nested |
| 59 | +> in a `no_std` repo and otherwise inherits the bare-metal target): |
| 60 | +> ```bash |
| 61 | +> cp -r bench-native /tmp/axiom-bench && cd /tmp/axiom-bench && cargo run --release |
| 62 | +> ``` |
| 63 | +
|
| 64 | +--- |
| 65 | +
|
| 66 | +## v0.2.0-alpha — Whole-file provenance (historical, QEMU cycle counts) |
| 67 | +
|
| 68 | +> Historical entry. These numbers measure the earlier *whole-file* design in RDTSC cycles |
| 69 | +> under QEMU emulation, and are superseded by the block-level design and real-hardware |
| 70 | +> measurements in v0.3.0 above. Cycle counts under emulation do not reflect real silicon. |
| 71 | +
|
| 72 | +### Platform |
4 | 73 | - Architecture: x86_64 bare metal |
5 | 74 | - Environment: QEMU system emulation |
6 | 75 | - Measurement: RDTSC hardware cycle counter |
7 | 76 | - Runs: 5 independent cold boots |
8 | 77 |
|
9 | | -## x86_64 Results (v0.2.0-alpha) |
| 78 | +### x86_64 Results |
10 | 79 |
|
11 | | -| Operation | Mean cycles/op | Std Dev | CV | Latency @3GHz | |
| 80 | +| Operation | Mean cycles/op | Std Dev | CV | Latency @3 GHz | |
12 | 81 | |---|---|---|---|---| |
13 | 82 | | BLAKE3 hash (1000 iters) | 424,013 | ±12,421 | 2.9% | 0.141 ms | |
14 | 83 | | VFS read+verify (100 iters) | 2,153,973 | ±64,739 | 3.0% | 0.718 ms | |
15 | 84 |
|
16 | | -## Methodology |
| 85 | +### Methodology |
17 | 86 | - Each run is a fresh QEMU boot with no prior state |
18 | 87 | - RDTSC instruction used for cycle-accurate measurement |
19 | | -- No OS scheduling noise — bare metal execution |
20 | | -- VFS read+verify includes: hash recomputation + comparison + memory lookup |
| 88 | +- VFS read+verify includes hash recomputation, comparison, and memory lookup |
21 | 89 |
|
22 | | -## ARM64 Results |
23 | | -BLAKE3 executes correctly on ARM64 QEMU (Cortex-A57 model). |
24 | | -CNTVCT_EL0 on QEMU is a virtual timer, not a cycle counter — values do not reflect real silicon performance. |
25 | | -Hardware benchmarks deferred pending Raspberry Pi availability. |
| 90 | +### ARM64 |
| 91 | +BLAKE3 executes correctly on ARM64 under QEMU (Cortex-A57 model). `CNTVCT_EL0` under QEMU is |
| 92 | +a virtual timer, not a cycle counter, so values do not reflect real silicon; hardware ARM64 |
| 93 | +measurement was deferred (and is now provided natively in v0.3.0 above). |
26 | 94 |
|
27 | | -## Comparison: Axiom OS vs Linux IMA |
| 95 | +--- |
| 96 | +
|
| 97 | +## Comparison: Axiom OS vs. Linux IMA |
28 | 98 |
|
29 | 99 | | Property | Axiom OS | Linux IMA | |
30 | 100 | |---|---|---| |
31 | | -| Verification trigger | Every read | Load/exec time only | |
32 | | -| Hash algorithm | BLAKE3 (2.8 cycles/byte) | SHA-256 (18.4 cycles/byte) | |
| 101 | +| Verification trigger | Every read (in-memory) | Load / exec time only | |
| 102 | +| Hash algorithm | BLAKE3 | SHA-256 | |
33 | 103 | | Trust boundary | Kernel read path | LSM hook | |
34 | | -| Per-read overhead | 0.141ms (BLAKE3 only) | N/A | |
35 | | -| Bypass possible | No | Yes (ring-0 exploit) | |
| 104 | +| Re-verifies cached data | Yes | No | |
| 105 | +| In threat model | No ring-0 / DMA adversary | — | |
| 106 | +
|
| 107 | +> Note: Axiom's guarantee holds within its stated threat model (single-core, no DMA, no |
| 108 | +> ring-0 adversary). It does not claim to resist a privileged (ring-0) attacker; like most |
| 109 | +> in-kernel mechanisms, it can be bypassed by an adversary already executing in the kernel. |
0 commit comments