besu icon indicating copy to clipboard operation
besu copied to clipboard

Update config default values for header and chain segment requests

Open iamhsk opened this issue 3 years ago • 4 comments

  • --Xsynchronizer-downloader-chain-segment-size=100
  • --Xsynchronizer-downloader-header-request-size=100
  • --Xsynchronizer-fast-sync-full-validation-rate=0.0001

iamhsk avatar Aug 08 '22 22:08 iamhsk

https://github.com/hyperledger/besu/pull/4228

macfarla avatar Aug 09 '22 01:08 macfarla

Probably is worth to have a feedback from @ahamlat on the potential performance changes that this could introduce

fab-10 avatar Aug 09 '22 17:08 fab-10

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.

macfarla avatar Aug 09 '22 19:08 macfarla

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.

ajsutton avatar Aug 09 '22 23:08 ajsutton

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: 4471F80B-1509-4E42-B7DB-3E1773A6E508.jpeg

pinges avatar Sep 07 '22 05:09 pinges

All nodes, except for one with the changed defaults, were able to hold on to peers very well: 03D394E2-C051-4468-9F83-D1D6031E9D3F.jpeg

pinges avatar Sep 07 '22 05:09 pinges

Closing this. From testing and experiments it does not appear to impact peering significantly so we won't change the defaults.

macfarla avatar Sep 11 '22 23:09 macfarla