Node BUG: Mainnet sync: peak RAM nearly doubled in node 11.1.0 (15.4 -> 36.2 GiB)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- haskell
- Ambito
- databases, distributed-systems
Direzione di ricerca
Inizia dalle misurazioni riportate per 11.0.1 rispetto a 11.1.0 e dalla pull request collegata ouroboros-consensus#2227, che identifica il fatto che la garbage collection di LedgerDB è subordinata allo snapshotting. Confronta lo stato del backport pertinente e riproduci o convalida il profilo di memoria della sincronizzazione; il lavoro è completato quando viene confermato se il backport rimuove la regressione di retention osservata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Full mainnet sync from genesis with node 11.1.0 consumed roughly twice the memory of
11.0.1 while getting faster. Peak RSS went from 15.43 GiB to 36.15 GiB (+134%), and
peak retained live data from 10.28 GiB to 25.65 GiB (+150%).
Full report, including per-era timings and graphs:
https://docs.google.com/document/d/e/2PACX-1vTujvaT-knCY4ZTUVqUelUIww8n9LJhbd8ZnBjMsUxAp4fvpfmcVFux-qENSzL057vXPxON5LC8_UMk/pub
What was measured
Full mainnet syncs from genesis on the same host (32 cores, 134 GB RAM, V2InMemory
LedgerDB backend, ghc-9.6). Memory figures are parsed from the node's own Resources:
trace lines, so GC live bytes is what the collector could not reclaim, as distinct from
heap the RTS happens to be holding.
| 11.0.1 | 11.1.0 | change | |
|---|---|---|---|
| Peak RSS | 15.43 GiB | 36.15 GiB | +134% |
| Mean RSS | 12.95 GiB | 18.92 GiB | +46% |
| Peak GC live bytes | 10.28 GiB | 25.65 GiB | +150% |
| Mean GC live bytes | 6.03 GiB | 9.06 GiB | +50% |
| Major GCs | 1,896 | 1,331 | -30% |
| Total allocation | 336 TB | 285 TB | -15% |
| Sync time | 133,009 s | 116,618 s | -12.3% |
| Mean CPU load | 152% | 156% | +2.6% |
Speed was not affected: 11.1.0 finished 4 h 33 min faster and advanced 6.9 M slots
further, with CPU load flat. The regression is purely in memory.
No OOM was recorded: the test host has 134 GB, so a 36 GiB peak is survivable there but
not on the 16-32 GB machines many operators run.
Shape of the regression
The two releases produce distinct heap profiles, and the shape is what points at the
cause:
- 11.0.1 - monotone staircase. Climbs in steps to a 15.34 GiB plateau at slot 134 M
and never gives memory back: 21 heap decreases across 130,674 samples, nothing above
20 GiB. - 11.1.0 - volatile sawtooth. Oscillates roughly 19-36 GiB with 204 heap decreases.
34.7% of samples sit above 20 GiB and 6.0% above 30 GiB across 21 separate excursions.
The pattern starts early: 11.1.0 is already at 9.16 GiB RSS before slot 20 M, where
11.0.1 is at 2.24 GiB.
Three details indicate retention rather than allocation churn:
- The regression is in
GC live bytes, i.e. data the collector could not reclaim, not
just in heap the RTS was holding spare. - Node 11.1.0 ran fewer major GCs than 11.0.1 (1,331 vs 1,896) despite holding far
more heap, so the heap was ballooning between collections. - It allocated less in total than 11.0.1 (285 vs 336 TB) while retaining much more,
so this is not extra garbage being produced.
The run took 386 snapshots at a median interval of 5.0 minutes, and the RSS excursions
recur on a comparable cadence - consistent with ledger states accumulating until each
snapshot completed and only then being collected.
Root cause
ouroboros-consensus#2227,
"Decouple LedgerDB garbage collection from snapshotting", merged 2026-08-27 onto
ouroboros-consensus-4.x-backports:
As the thread delay for snapshotting was blocking the snapshotting thread, we would
accumulate states in the LedgerDB until the snapshot was taken.
The delay now runs in its own thread, so LedgerDB garbage collection is no longer gated
on snapshotting.
- Lingua principale
- Python
- Stelle
- 59
- Fork
- 28
- Merge medio
- 8h 27m
- PR unite (30g)
- 88
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di IntersectMBO/cardano-node-tests
-
node upstream bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
IntersectMBO/cardano-node-tests#3670 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Integrate Antithesis using MOOG into Cardano node test suiteForse di nuovo libera @saratomaz l’ha presa 279 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
IntersectMBO/cardano-node-tests#3316 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
db-sync enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
IntersectMBO/cardano-node-tests#2653 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[FR] cardano-db-sync - Create tests for new db-sync configurationForse già presa @ArturWieczorek l’ha presa 118 giorni fa. Apertadb-sync enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
IntersectMBO/cardano-node-tests#2652 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
IntersectMBO/cardano-node-tests#2421 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di IntersectMBO/cardano-node-tests
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Treat corrupt-shape state files as missing in `load_state`Forse già presa @Qrytics l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
OvertureMaps/overturemaps-py#175 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
awslabs/visual-asset-management-system#1278 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
aws-samples/sample-per-model-bedrock#835 ·
I maintainer di solito rispondono entro 1 giorno