feat(connmgr): lower the default connection pool#9467
Conversation
|
@lidel : I sanity checked the number of Low=50, High=150 By default if a Kubo node has 8GB of total memory, a maxMemory for libp2p will be set to 2GB. That will cause System.ConnsInbound to be 128 I believe (looks like 64 per GB of memory here: https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/limit_defaults.go#L345 since Kubo is using those same libp2p defaults: https://github.com/ipfs/kubo/blob/master/core/node/libp2p/rcmgr_defaults.go#L94). As a result, in this particular setup, our high water mark may not get hit (unless there are sufficient outbound connections). I know there isn't a perfect number here and we have no stats on the systems that folks are using. I would be in favor of dropping the ConnMgr.High to 120 instead. |
|
Continued in #9483 |
This PR aims to close #9420 by lowering the implicit defaults for
Swarm.ConnMgr.Rationale
It will not only help with #9442 but also decrease bitswap gossip.
To apply change to legacy nodes that were initialized before #8913, we need to perform config migration described in #8913 (review)
TODO
Swarm.ConnMgrto{}if values match old defaults)