lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Compress and linearise beacon blocks on disk

Open michaelsproul opened this issue 3 years ago • 2 comments

Issue Addressed

Closes #3208

Proposed Changes

Very much WIP but this seems to be not too bad. Main TODOs are testing performance and providing backwards compatibility

michaelsproul avatar Sep 16 '22 08:09 michaelsproul

Syncing a new node with this code to see a) how big the database ends up and b) what the I/O pattern is like once backfill completes.

michaelsproul avatar Sep 19 '22 03:09 michaelsproul

This is looking good from a disk usage point of view, using only 48.1 GB after a few days (less than half what we currently use).

However the impact on I/O write amplification is not as good as I'd hoped, with only a ~10% reduction in gigabytes written per day. Data here: https://docs.google.com/spreadsheets/d/1-5ewstEFOQzHpoMLmlpWBBHBtJ7klSrjaVSmqwV7t0o/edit?usp=sharing.

I think the remaining writes are probably coming from hot states, which we write every epoch boundary. Using tree-states and the I/O queue idea I think we should be able to eliminate most of these (https://github.com/sigp/lighthouse/issues/2844).

michaelsproul avatar Sep 20 '22 23:09 michaelsproul

Closing as this is now merged into https://github.com/sigp/lighthouse/pull/3206.

michaelsproul avatar Oct 19 '22 03:10 michaelsproul