grin icon indicating copy to clipboard operation
grin copied to clipboard

limit how often compaction runs during sync

Open antiochp opened this issue 4 years ago • 0 comments

Related #3567. Related #3579.

Full archival sync (#3579) has been implemented and we now allow chain compaction to run during sync. This avoids the problem of a "stop the world" compaction event occurring after completing a sync of ~1,100,000 blocks.

But we traded smaller faster compaction events that now occur frequently during sync. And this in turn slows the sync process down.

We limit compaction to only run (on average) every 1440 blocks, but this is significantly too frequently during sync, particularly archive sync.

We would like to limit the compaction to only run once per hour (maybe even less frequently than that) based on "wall clock" time in addition to the 1440 block height period.

antiochp avatar Mar 16 '21 15:03 antiochp