Update config.md for resource management limits (#9421)
Steve Loeppky committed
Nov 18, 2022 at 09:51 UTC
039badf3b24bba4b3a6ca80e2b5163afa4e4b7cb
1 file changed
+8
-4
docs/config.md
+8
-4
@@ -1853,11 +1853,18 @@ We trust this node to behave properly and thus don't limit *outbound* connection
1853
We apply any limits that libp2p has for its protocols/services
1854
since we assume libp2p knows best here.
1855
1856
-** libp2p resource monitoring **
1856
+##### Active Limits
1857
+A dump of what limits were computed and are actually being used by the resource manager
1858
+can be obtained by `ipfs swarm limit all`.
1859
+
1860
+##### libp2p resource monitoring
1861
For [monitoring libp2p resource usage](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#monitoring),
1862
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`).
1863
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.
1864
1865
+A textual view of current resource usage and a list of services, protocols, and peers can be
1866
+obtained via `ipfs swarm stats --help`
1867
+
1868
#### `Swarm.ResourceMgr.Enabled`
1869
1870
Enables the libp2p Resource Manager using limits based on the defaults and/or other configuration as discussed above.
@@ -1935,9 +1942,6 @@ Example #2: setting a specific <key,value> limit
1942
}
1943
```
1944
1938
-Current resource usage and a list of services, protocols, and peers can be
1939
-obtained via `ipfs swarm stats --help`
1940
-
1945
It is also possible to adjust some runtime limits via `ipfs swarm limit --help`.
1946
Changes made via `ipfs swarm limit` are persisted in `Swarm.ResourceMgr.Limits`.
1947