Description
On chiado, the Flat state backend is consistently slower per block than HalfPath — 17 to 20% at p50 and p90, and up to 2.3x slower at p99. This is the only network where Flat loses; on every other pairing measured, Flat wins by 1.4 to 2.4x at p50 and up to 3.2x at p99.
What makes chiado different is that its blocks are trivially small: median block processing there is 2 to 3 ms. That points at a fixed per-block overhead in Flat that only becomes visible when there is almost no state work to amortise it against — which would also affect small or empty blocks on any chain.
Steps to Reproduce
- Run two chiado nodes with identical configuration except the state backend, one Flat and one HalfPath, both following the head.
- Collect the
Processed ... | N ms | figure from each node's own logs over an hour.
- Compare the percentile distributions.
Actual behavior
Two independent 60-minute windows, n = 637 and n = 650 blocks per node. HalfPath/Flat ratio:
| percentile |
window 1 |
window 2 |
| p50 |
0.85 |
0.83 |
| p90 |
0.84 |
0.84 |
| p99 |
0.82 |
0.43 |
In window 2, p99 is 25.4 ms for Flat against 10.8 ms for HalfPath.
Expected behavior
Flat should be at least as fast as HalfPath on small blocks, as it is everywhere else.
Additional context
Confidence is high that the effect is real — it replicates across both windows with a consistent sign at every percentile — and zero as to cause.
One lead, unconfirmed: on the same pairing, Flat's RocksDB block cache was the smallest relative to its HalfPath twin of any pair measured, 123 MB against 471 MB, a ratio of 0.26. A smaller block cache means more reads per block. Whether that is cause, consequence, or coincidence was not established.
Desktop
- Operating System: Linux x64
- Version: 2.0.0-rc (
e6d3d2f5ab)
- Installation Method: Docker
Description
On chiado, the Flat state backend is consistently slower per block than HalfPath — 17 to 20% at p50 and p90, and up to 2.3x slower at p99. This is the only network where Flat loses; on every other pairing measured, Flat wins by 1.4 to 2.4x at p50 and up to 3.2x at p99.
What makes chiado different is that its blocks are trivially small: median block processing there is 2 to 3 ms. That points at a fixed per-block overhead in Flat that only becomes visible when there is almost no state work to amortise it against — which would also affect small or empty blocks on any chain.
Steps to Reproduce
Processed ... | N ms |figure from each node's own logs over an hour.Actual behavior
Two independent 60-minute windows, n = 637 and n = 650 blocks per node. HalfPath/Flat ratio:
In window 2, p99 is 25.4 ms for Flat against 10.8 ms for HalfPath.
Expected behavior
Flat should be at least as fast as HalfPath on small blocks, as it is everywhere else.
Additional context
Confidence is high that the effect is real — it replicates across both windows with a consistent sign at every percentile — and zero as to cause.
One lead, unconfirmed: on the same pairing, Flat's RocksDB block cache was the smallest relative to its HalfPath twin of any pair measured, 123 MB against 471 MB, a ratio of 0.26. A smaller block cache means more reads per block. Whether that is cause, consequence, or coincidence was not established.
Desktop
e6d3d2f5ab)