Skip to content

Commit

Permalink
Update config.md for resource management limits (#9421)
Browse files Browse the repository at this point in the history
  • Loading branch information
BigLep authored Nov 18, 2022
1 parent 6f730dc commit 039badf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1853,11 +1853,18 @@ We trust this node to behave properly and thus don't limit *outbound* connection
We apply any limits that libp2p has for its protocols/services
since we assume libp2p knows best here.

** libp2p resource monitoring **
##### Active Limits
A dump of what limits were computed and are actually being used by the resource manager
can be obtained by `ipfs swarm limit all`.

##### libp2p resource monitoring
For [monitoring libp2p resource usage](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#monitoring),
various `*rcmgr_*` metrics can be accessed as the prometheus endpoint at `{Addresses.API}/debug/metrics/prometheus` (default: `http://127.0.0.1:5001/debug/metrics/prometheus`).
There are also [pre-built Grafana dashboards](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager/obs/grafana-dashboards) that can be added to a Grafana instance.

A textual view of current resource usage and a list of services, protocols, and peers can be
obtained via `ipfs swarm stats --help`

#### `Swarm.ResourceMgr.Enabled`

Enables the libp2p Resource Manager using limits based on the defaults and/or other configuration as discussed above.
Expand Down Expand Up @@ -1935,9 +1942,6 @@ Example #2: setting a specific <key,value> limit
}
```

Current resource usage and a list of services, protocols, and peers can be
obtained via `ipfs swarm stats --help`

It is also possible to adjust some runtime limits via `ipfs swarm limit --help`.
Changes made via `ipfs swarm limit` are persisted in `Swarm.ResourceMgr.Limits`.

Expand Down

0 comments on commit 039badf

Please sign in to comment.