Lower default connection limits (Swarm.ConnMgr) #9420
Labels
effort/days
Estimated to take multiple days, but less than a week
exp/intermediate
Prior experience is likely helpful
kind/maintenance
Work required to avoid breaking changes or harm to project's status quo
P2
Medium: Good to have, but can wait until someone steps up
topic/bitswap
Topic bitswap
topic/config
Topic config
topic/connection-manager
Issues related to Swarm.ConnMgr (connection manager)
The default limits defined in Swarm.ConnMgr are very old, come from the time when network was very small and DHT was not the best (<0.5), and we had no QUIC transports.
We keep hundreds of connections around:
kubo/config/init.go
Lines 97 to 103 in e34c0da
Times changed, and these are, arguably, no longer good defaults. Keeping hundreds of connections around introduces various problems such as ambient bandwidth cost due to bitswap gossip. Every peer asking all peers it is connected to if they have every CID it is tryting to fetch
Proposed change
Lower the implicit defaults for
Swarm.ConnMgr.LowWater
andSwarm.ConnMgr.HighWater
.What should be the new values?
Brave and IPFS Desktop both run with lowered limits:
Unless there is a good reason to keep these connections around, I would set default to the same values.
TODO
Swarm.ConnMgr
and removes all fields from the object if they all match legacy defaults:The text was updated successfully, but these errors were encountered: