Increase peer limit
Increase the peer limit in Besu from 25 peers. As part of this we need investigate what appropriate limit would be and test for any negative impacts.
hey @jframe , did some digging regarding this, was thinking to inc the peer limit to say 2x the current value and then test, negative impacts can include :
- -> when at the limit, Besu disconnects the “least useful” peers; with a higher cap, churn and log noise can rise during busy periods (unlikely tho, coz we enforceConnectionLimits in
EthPeers.java) - -> filling a bigger target causes more discovery traffic and dials initially
- -> sync slowdown from trailing peers (although this we handle, we cap trailing peers to a fraction of the limit to preserve headroom for useful peers)
- -> more peers means more blocks / more txns , basically increased gossip
- -> increased cpu usage
if this sounds apt to you, i can proceed with the testing part for a new limit of 50 to start with?
@Matilda-Clerke What are your thoughts on the analysis?
Sounds like a reasonable analysis of the potential issues. I suggest also experimenting with increasing the number of threads used in syncing (--Xsynchronizer-downloader-parallelism option)
@isuniverseok-ua Are you still wanting to pick this up? If so I can assign this to you.
ya @jframe you can assign it to me
hi @jframe , tried to increase the peer limit to 50, while spinning a local devnet using kurtosis (ref - https://github.com/hyperledger/besu/wiki/Devnet-Testing-and-Tooling) i got this rpc error -
rpc error: code = Unavailable desc = connection error: desc = "transport: failed to write client preface: write tcp x.x.x.x: 62503->x.x.x.x: 62485: use of closed network connection
tried restarting the engine, tearing down enclave, also checked the logs but couldn't find a wayaround, do you have any idea of this, or is there any other simpler way to spin a devnet, wanted to track some metrics for the case when i increase the peer limit to 50
Not sure on that error. Probably best to ask that question in besu discord channel