You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tool to allow us to change our snapshot files from 1 step size to another - can be achieved just by renaming the files (as long as step sizes are multiples of 2) and deleting chaindata
can be fully automated ie on startup we can have a flag for step size -> detect what our current step size is in existing files -> apply the necessary renames -> delete chaindata -> continue
this should make it easy to experiment with currentStepSize/2, currentStepSize/4, currentStepSize/8, currentStepSize/16, etc. and gathering metrics to assess performance differences
unrelated to this one, but made me waste some time. need to track it down anyway bc rebasing steps requires cleaning up chaindata
running against old code the execution seems to restart from 0, which means there may be additional hardcoded assumptions in code about step geometry that I'm going to debug.
there is actually a limitation to this approach with the current default step size because it is defined as 1_562_500; it can be divided by 4, but not by 8, etc...
we can use the rename approach to, let's say, divide the step by 20, so 1 becomes 20 in the filenames, but our "piramid-merging" algorithm may go crazy.
I actually want to divide by 20 on bloatnet experiment since the gas limit there went 30M -> 500M, let me see if we can ignore background merging eventual errors, but we may want to revisit the "piramid-merging" algorithm or make a "not-just-rename-but-total-rewrite" step rebasing implementation.
I see in the experiments you only run for ~1700 blocks? For me that was not enough to see the bloat and drastic degradation. The bloat used to happen after letting the node run for ~1 day which is a lot more than 1700 blocks. Also it reallyreally depends which blocks you executed from the bloated ones. I suggest to execute all from 22600001 (the fork point or earlier doesn't have to be exact) to 22877864 (slot https://dora.perf-devnet-2.ethpandaops.io/slot/80112) which is where the bloating stopped (as per the screenshot below) - if you go on Dora you will see that all blocks before it are pretty much at 500MGas. Also curious what --loop.sync.block.limit did you use in your experiment?
I remember 1 problem of using dupsort for Storage - we can use it for StorageDomain, but can’t do same for CommitmentDomain - because CommitmentDomain has different key lengths (sort order will break if dupsort them).
if you run mdbx_chk -vvv i guess it can show you how much free space is in each DB Table.
I assume it is the following section:
- Page allocation:
backed by file: 20023296 pages (29.8%), 47085568 left to boundary (70.2%)
used: 7377420 page(s), 36.8% of backed, 11.0% of boundary
remained: 12045332 page(s) (60.2%) of backed, 59130900 to boundary (88.1% of boundary)
reclaimable: 600120 (3.0% of backed, 0.9% of boundary), GC 600544 (3.0% of backed, 0.9% of boundary)
detained by reader(s): 424 (0.0% of backed, 0.0% of boundary), 1 reader(s), lag 0
allocated: 7977964 page(s), 39.8% of backed, 11.9% of boundary
available: 12645452 page(s) (63.2%) of backed, 59731020 to boundary (89.0% of boundary)
= upto 67108864 pages, backed 20023296 (29.8%), allocated 7977964 (11.9%), available 59731020 (89.0%)
I ran a "much more aggressive step size" just to see what happens: I used "step size / 100", then in < 12 hours I got a chaindata of 320GB, but examining the DB, it is only using ~120GB of data.
in the mdb_chk output I see backed matches the 320GB mdbx.dat, the allocated matches the ~120GB "real" usage.
and the ~200GB extra allocated space seems to be the "available", but where does that come from? i.e. something mdbx or some erigon behavior lead to that?
I think mdbx_chk can print statistic for each DBI too - and i think can see there. mdbx_chk is not mdbx_stat.
Activity
VBulikov commentedon Aug 21, 2025
taratorio added Imp2 as Importance
[-][bloatnet] experiment with reducing step size[/-][+][bloatnet] experiment: change StepSize[/+]wmitsuda commentedon Oct 8, 2025
some status update here:
config3.go.weird stuff that needs to be done:
wmitsuda commentedon Oct 9, 2025
there is actually a limitation to this approach with the current default step size because it is defined as 1_562_500; it can be divided by 4, but not by 8, etc...
we can use the rename approach to, let's say, divide the step by 20, so 1 becomes 20 in the filenames, but our "piramid-merging" algorithm may go crazy.
I actually want to divide by 20 on bloatnet experiment since the gas limit there went 30M -> 500M, let me see if we can ignore background merging eventual errors, but we may want to revisit the "piramid-merging" algorithm or make a "not-just-rename-but-total-rewrite" step rebasing implementation.
erigon seg step-rebase tool (#17394)
wmitsuda commentedon Oct 10, 2025
I wrote my conclusions for the first round of tests: https://hackmd.io/@wmitsuda/BkFmxXL6ge
TLDR; I didn't notice improvement on execution time; aggressive step size reduction was effective in limiting chaindata growth though.
happy to hear about improvements in the methodology if we want to do another round of tests, or we consider this done for bloatnet purposes.
cc: @AskAlexSharov
taratorio commentedon Oct 10, 2025
I see in the experiments you only run for
~1700blocks? For me that was not enough to see the bloat and drastic degradation. The bloat used to happen after letting the node run for ~1 day which is a lot more than 1700 blocks. Also it really really depends which blocks you executed from the bloated ones. I suggest to execute all from 22600001 (the fork point or earlier doesn't have to be exact) to 22877864 (slot https://dora.perf-devnet-2.ethpandaops.io/slot/80112) which is where the bloating stopped (as per the screenshot below) - if you go on Dora you will see that all blocks before it are pretty much at 500MGas. Also curious what --loop.sync.block.limit did you use in your experiment?AskAlexSharov commentedon Oct 10, 2025
oh, nice.
worst case of chaindata size get visible after pruning couple steps from db (after couple new files production)
my head expected 2x reduction on stepSize/2 :-) plz add to hackmd (to any case):
46 remaining items
wmitsuda commentedon Nov 6, 2025
2KB == sum of all dup values of same key? or 2KB each val of same key?
wmitsuda commentedon Nov 6, 2025
it is not:
AskAlexSharov commentedon Nov 7, 2025
2KB each val of same key
AskAlexSharov commentedon Nov 7, 2025
I remember 1 problem of using dupsort for Storage - we can use it for StorageDomain, but can’t do same for CommitmentDomain - because CommitmentDomain has different key lengths (sort order will break if dupsort them).
AskAlexSharov commentedon Nov 7, 2025
I think mdbx_chk can print statistic for each DBI too - and i think can see there. mdbx_chk is not mdbx_stat.
I know “reclaimable” is FreeList.
Domain statistics support tool (#17795)
AskAlexSharov commentedon Nov 20, 2025
@wmitsuda look - maybe this can reduce db size on bloatnet - try: #17962
VBulikov commentedon Nov 25, 2025
Giulio2002 changed Start date from 18/10/2025 to 29/10/2025
VBulikov commentedon Nov 25, 2025
Giulio2002 changed Due date from 14/12/2025 to 25/12/2025
wmitsuda commentedon Dec 4, 2025
just dumping some personal notes about bloatnet so I don't lose those info:
Merge v3.3.1 (#19)
wmitsuda commentedon Jan 15, 2026
let's closing this one as: