Skip to content

GHC 9.12.2: UTxO read regression (2x on 10k) and heavier TxHistory writes #5170

@paolino

Description

@paolino

Context

Benchmark comparison across GHC 9.6.6, 9.8.2, 9.10.1, 9.12.2 (see #5166) revealed two regressions in 9.12.2.

UTxO Read — 2x regression on 10k entries

Workload 9.6.6 9.8.2 9.10.1 9.12.2
10k ada-only 0.297ms 0.312ms 0.335ms 0.645ms
100k ada-only 2.74ms 2.94ms 3.79ms 3.36ms

The 10k case doubles from 0.297ms to 0.645ms. The 100k case shows a smaller ~23% regression.

TxHistory Write — ~11% regression on heavy workloads

Workload 9.6.6 9.8.2 9.10.1 9.12.2
1000 50i+100o (run 3) 61.6s 59.4s 63.4s 66.1s
10000 10i+10o 6.85s 6.70s 7.19s 7.47s

Notes

  • Both are DB-bound workloads where serialization/deserialization code may be affected by GHC codegen changes
  • 9.12.2 is the overall winner on every other benchmark (memory -7.5%, read-blocks, API, latency)
  • 9.8.2 was consistently best on these DB write benchmarks across all GHC versions tested
  • Worth investigating whether this is a GHC codegen issue or a CBOR/store serialization path that changed behavior

Benchmark runs

Acceptance criteria

  • Root cause identified and documented (linked PR or comment) for the 10k UTxO-read 2x regression on 9.12.2
  • UTxO Read 10k ada-only on GHC 9.12.2 within 20% of the GHC 9.6.6 baseline (0.297ms) in benchmark CI
  • TxHistory Write 1000 50i+100o on GHC 9.12.2 within 5% of the GHC 9.8.2 baseline (59.4s)
  • Follow-up benchmark run linked in this issue demonstrating the fix on main

Metadata

Metadata

Assignees

Labels

BugGHCCompiler bumps

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions