besu
besu copied to clipboard
Update config default values for header and chain segment requests
--Xsynchronizer-downloader-chain-segment-size=100--Xsynchronizer-downloader-header-request-size=100--Xsynchronizer-fast-sync-full-validation-rate=0.0001
https://github.com/hyperledger/besu/pull/4228
Probably is worth to have a feedback from @ahamlat on the potential performance changes that this could introduce
Yes definitely welcome your input @ahamlat !
More context - this came about because @ajsutton said this worked better than the defaults
I’m not sure if I’ve said this somewhere already or not, but if it helps any, I’ve had a lot of success syncing besu nodes with 22.7.0-RC2 and RC3 using:
besu_data_storage_format: "BONSAI"
besu_cmdline_args:
- "--Xsynchronizer-downloader-chain-segment-size=100"
- "--Xsynchronizer-downloader-header-request-size=100"
- "--Xsynchronizer-fast-sync-full-validation-rate=0.0001"
besu_sync_mode: X_CHECKPOINT
The Xsynchronizer-fast-sync-full-validation-rate is just cheating to save CPU and I don’t think it’s actually affecting the ability to sync, though it may be making it a little faster.
The reduced request sizes I think are what’s been most helpful. I’ve sync’d ropsten, goerli and MainNet multiple times with this setup and they’ve found and held peers well.
@pinges also has a draft PR up to get some grafana metrics.
I would not recommend changing --Xsynchronizer-fast-sync-full-validation-rate=0.0001 to be the default. That reduces the security of fast/snap/checkpoint sync because it doesn't verify as many headers fully. It's ok if you know you've done it and pay attention to the final sync result but probably doesn't make a good default. While it may make importing the blocks faster, it shouldn't affect the ability to keep peers around which was the major impediment to sync I was hitting - the two reduced sizes are much more likely to be the reason besu kept peers better.
The latest experiment on mainnet with 3 nodes with changes and 3 nodes without resulted in the 3 nodes without the changes to the defaults to finish syncing earlier than the three nodes with the changes:
All nodes, except for one with the changed defaults, were able to hold on to peers very well:
Closing this. From testing and experiments it does not appear to impact peering significantly so we won't change the defaults.