OPTEE TRNG vs PRNG Impact on Cyclictest Latencies
Headline:
- OPTEE PRNG consistently lowers Core0 max in customer tests.
Across all 8 Customer -i1000 pairs, switching from OoB OPTEE (hardware TRNG)
to OPTEE-PRNG reduced Core0 max in every pair, with reductions ranging from
-17 µs to -262 µs. Mean reduction ≈ -163 µs.
- OPTEE PRNG consistently lowers Core1 max in SDK tests.
All 8 SDK pairs show Core1 max ≤ OoB. The largest improvements are in
isolated SDK runs (Core1 max collapses from ~100 µs down to 36-37 µs).
- The customer-test Core1 max is largely unaffected by OPTEE choice.
Of 8 Customer -i1000 pairs, only 3 show a meaningful Core1 reduction
(-20, -31, -107 µs); the other 5 are within ±10 µs.
What is being compared
"OoB" is the out-of-the-box OPTEE binary that uses the hardware TRNG path.
"PRNG" is the OPTEE binary rebuilt with the TRNG path replaced by a software
pseudo-RNG.
SDK test pairs (8)
Aggregate Δmax (B − A) where A=OoB, B=PRNG, so negative = PRNG better:
Core0: mean Δmax0 = -31.8 µs |
PRNG better in 7/8 pairs,
worse in 1, tied in 0.
Core1: mean Δmax1 = -45.0 µs |
PRNG better in 8/8 pairs,
worse in 0, tied in 0.
| condition (fixed) | OoB file | max0 | max1 | PRNG file | max0 | max1 | Δmax0 | Δmax1 | plot |
|---|
| col=SDK test, fs=base, optee=oob, iso=n, ddr=n | 260522_2 | 51 | 122 | 260522_4 | 54 | 63 | +3 | -59 | histograms ↓ |
| col=SDK test, fs=base, optee=oob, iso=n, ddr=Y | 260524_1 | 72 | 85 | 260523_3 | 54 | 83 | -18 | -2 | histograms ↓ |
| col=SDK test, fs=base, optee=oob, iso=Y, ddr=n | 260530_1 | 108 | 102 | 260531_1 | 62 | 37 | -46 | -65 | histograms ↓ |
| col=SDK test, fs=base, optee=oob, iso=Y, ddr=Y | 260524_3 | 93 | 84 | 260527_1 | 67 | 37 | -26 | -47 | histograms ↓ |
| col=SDK test, fs=default, optee=oob, iso=n, ddr=n | 260518_1 | 126 | 66 | 260519_1 | 62 | 55 | -64 | -11 | histograms ↓ |
| col=SDK test, fs=default, optee=oob, iso=n, ddr=Y | 260526_4 | 104 | 107 | 260531_4 | 81 | 68 | -23 | -39 | histograms ↓ |
| col=SDK test, fs=default, optee=oob, iso=Y, ddr=n | 260530_4 | 101 | 111 | 260530_2 | 61 | 36 | -40 | -75 | histograms ↓ |
| col=SDK test, fs=default, optee=oob, iso=Y, ddr=Y | 260526_2 | 104 | 99 | 260524_2 | 64 | 37 | -40 | -62 | histograms ↓ |
Customer test (-i1000) pairs (8)
Aggregate Δmax (B − A) where A=OoB, B=PRNG, so negative = PRNG better:
Core0: mean Δmax0 = -144.9 µs |
PRNG better in 8/8 pairs,
worse in 0, tied in 0.
Core1: mean Δmax1 = -19.2 µs |
PRNG better in 4/8 pairs,
worse in 4, tied in 0.
| condition (fixed) | OoB file | max0 | max1 | PRNG file | max0 | max1 | Δmax0 | Δmax1 | plot |
|---|
| col=Customer -i1000, fs=base, optee=oob, iso=n, ddr=n | 260529_1 | 460 | 72 | 260531_3 | 198 | 73 | -262 | +1 | histograms ↓ |
| col=Customer -i1000, fs=base, optee=oob, iso=n, ddr=Y | 260528_3 | 203 | 69 | 260528_2 | 83 | 49 | -120 | -20 | histograms ↓ |
| col=Customer -i1000, fs=base, optee=oob, iso=Y, ddr=n | 260529_4 | 250 | 180 | 260530_3 | 175 | 149 | -75 | -31 | histograms ↓ |
| col=Customer -i1000, fs=base, optee=oob, iso=Y, ddr=Y | 260525_1 | 240 | 113 | 260526_1 | 72 | 116 | -168 | +3 | histograms ↓ |
| col=Customer -i1000, fs=default, optee=oob, iso=n, ddr=n | 260529_2 | 269 | 78 | 260531_2 | 252 | 72 | -17 | -6 | histograms ↓ |
| col=Customer -i1000, fs=default, optee=oob, iso=n, ddr=Y | 260528_4 | 251 | 59 | 260528_1 | 83 | 63 | -168 | +4 | histograms ↓ |
| col=Customer -i1000, fs=default, optee=oob, iso=Y, ddr=n | 260522_3 | 475 | 266 | 260529_3 | 251 | 159 | -224 | -107 | histograms ↓ |
| col=Customer -i1000, fs=default, optee=oob, iso=Y, ddr=Y | 260525_2 | 226 | 133 | 260523_2 | 101 | 135 | -125 | +2 | histograms ↓ |
Customer test (-M) pairs (1)
Aggregate Δmax (B − A) where A=OoB, B=PRNG, so negative = PRNG better:
Core0: mean Δmax0 = -58.0 µs |
PRNG better in 1/1 pairs,
worse in 0, tied in 0.
Core1: mean Δmax1 = +63.0 µs |
PRNG better in 0/1 pairs,
worse in 1, tied in 0.
| condition (fixed) | OoB file | max0 | max1 | PRNG file | max0 | max1 | Δmax0 | Δmax1 | plot |
|---|
| col=Customer -M, fs=default, optee=oob, iso=Y, ddr=n | 260521_1 | 324 | 165 | 260521_3 | 266 | 228 | -58 | +63 | histograms ↓ |
Customer test (-i200 -M) pairs (3)
Aggregate Δmax (B − A) where A=OoB, B=PRNG, so negative = PRNG better:
Core0: mean Δmax0 = -53.0 µs |
PRNG better in 2/3 pairs,
worse in 1, tied in 0.
Core1: mean Δmax1 = -48.0 µs |
PRNG better in 2/3 pairs,
worse in 1, tied in 0.
| condition (fixed) | OoB file | max0 | max1 | PRNG file | max0 | max1 | Δmax0 | Δmax1 | plot |
|---|
| col=Customer -i200 -M, fs=base, optee=oob, iso=Y, ddr=Y | 260525_3 | 234 | 221 | 260526_3 | 123 | 71 | -111 | -150 | histograms ↓ |
| col=Customer -i200 -M, fs=default, optee=oob, iso=Y, ddr=n | 260520_2 | 127 | 113 | 260521_2 | 152 | 147 | +25 | +34 | histograms ↓ |
| col=Customer -i200 -M, fs=default, optee=oob, iso=Y, ddr=Y | 260525_4 | 126 | 98 | 260523_1 | 53 | 70 | -73 | -28 | histograms ↓ |
Conclusions
- For the SDK test: OPTEE-PRNG improves Core1 max in 8/8 pairs and is
not contradicted by any data point. Improvement is largest when isolated
(max1 typically drops from ~100 µs to ~37 µs).
- For the customer test, OPTEE-PRNG removes a Core0 outlier source.
Pair after pair, OoB Core0 max sits in the 200-475 µs range while PRNG Core0
max sits in the 70-250 µs range under the same conditions. The histograms
show that the OoB Core0 tail extends ~100-300 µs further than PRNG.
- OPTEE choice does not strongly determine customer-test Core1 max.
Three pairs show meaningful Core1 reductions with PRNG (-20, -31, -107 µs);
five pairs are flat within ±10 µs.
- If the goal is minimum customer-test Core1 max: OPTEE-PRNG does not
make Core1 max meaningfully worse and it halves Core0 outliers, but it is
not the lever that gets Core1 max down. The Core1 lever is core isolation
OFF and DDR QoS modifications (covered in their own reports).
Caveats
- The test plan does not include any duplicate runs of the same condition,
so the run-to-run noise floor for max latency cannot be directly measured.
Observed max-latency shifts of ≲30 µs in any pair should be treated as
possibly attributable to inter-run noise.
- Pairs span up to ~13 days. Any platform drift over that period (board
warmth, OPTEE/SDK rebuilds, kernel boot slot) is not controlled.
- The -M and -i200 -M columns are sparse (1-3 OPTEE pairs each). Findings
there are directional, not statistically firm.
Appendix — per-pair histogram overlays
Reading the plots: filled circles are the baseline (A) run, "x" markers
are the changed (B) run. The top panel is Core 0, the bottom panel is Core 1,
both on a log-y count axis. A bump in the A curve that vanishes in the B curve
is direct visual evidence that the factor under test produced or removed a
latency cluster.
SDK test
Customer test (-i1000)
Customer test (-M)
Customer test (-i200 -M)