You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go-libp2p v0.18.0 adds support for the resource manager. The resource manager is already initialized in #8680, and will limit libp2p's resource usage. Optionally, the user can define new limits using a limits.json file.
What is missing here is visibility into the running system. Once we roll this out, we might get complaints from users that connections / streams are getting blocked by the rcmgr. This can either be due to too low limits (for their use case), or due to a bug in the implementation (e.g. resources not properly released).
Prior Art: filecoin-project/lotus#7969. Lotus added a netstat command, which can show the current usage of the different scopes. We should probably have something similar in IPFS.
How?
We need to capture and store the pointer to the libp2p resource manager. Currently, fx only initializes it and passes the option to libp2p. We need the pointer to call the various Stat methods.
What?
go-libp2p v0.18.0 adds support for the resource manager. The resource manager is already initialized in #8680, and will limit libp2p's resource usage. Optionally, the user can define new limits using a
limits.json
file.What is missing here is visibility into the running system. Once we roll this out, we might get complaints from users that connections / streams are getting blocked by the rcmgr. This can either be due to too low limits (for their use case), or due to a bug in the implementation (e.g. resources not properly released).
Prior Art: filecoin-project/lotus#7969. Lotus added a
netstat
command, which can show the current usage of the different scopes. We should probably have something similar in IPFS.How?
fx
only initializes it and passes the option to libp2p. We need the pointer to call the variousStat
methods.ipfs net stat <scope>
(I'll let others decide what exactly the name of the command should be). The<scope>
should inspect the current resource usage for a scope. The scope can beall
,system
,transient
,svc:<service-name>
,proto:<protocol-name>
, orpeer:<peer-name>
. Implementation-wise, we can probably copy-paste a lot of code from https://github.com/filecoin-project/lotus/pull/7969/files#diff-b51b680e4d6352878815055582b90d38460108021bfb6d2ac9ce297b4a0d2a5e.Close
the resource manager on shutdown.Notes
This issue is part of the larger effort of integration go-libp2p v0.18.0 into go-ipfs: #8761
The text was updated successfully, but these errors were encountered: