Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(rcmgr): use default libp2p rcmgr metrics #9947

Merged
merged 5 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions core/node/libp2p/rcmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import (
"os"
"path/filepath"

"github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core/node/helpers"
"github.com/ipfs/kubo/repo"

"github.com/benbjohnson/clock"
logging "github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p"
Expand All @@ -16,10 +20,6 @@ import (
rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
"github.com/multiformats/go-multiaddr"
"go.uber.org/fx"

"github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core/node/helpers"
"github.com/ipfs/kubo/repo"
)

var rcmgrLogger = logging.Logger("rcmgr")
Expand Down Expand Up @@ -70,7 +70,6 @@ filled in with autocomputed defaults.`)
}

ropts := []rcmgr.Option{
rcmgr.WithMetrics(createRcmgrMetrics()),
rcmgr.WithTraceReporter(str),
rcmgr.WithLimitPerSubnet(
nil,
Expand Down
251 changes: 0 additions & 251 deletions core/node/libp2p/rcmgr_metrics.go

This file was deleted.

14 changes: 14 additions & 0 deletions docs/changelogs/v0.33.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@

This release includes some refactorings and improvements affecting Bitswap which should improve reliability. One of the changes affects blocks providing. Previously, the bitswap layer took care itself of announcing new blocks -added or received- with the configured provider (i.e. DHT). This bypassed the "Reprovider", that is, the system that manages precisely "providing" the blocks stored by Kubo. The Reprovider knows how to take advantage of the [AcceleratedDHTClient](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingaccelerateddhtclient), is able to handle priorities, logs statistics and is able to resume on daemon reboot where it left off. From now on, Bitswap will not be doing any providing on-the-side and all announcements are managed by the reprovider. In some cases, when the reproviding queue is full with other elements, this may cause additional delays, but more likely this will result in improved block-providing behaviour overall.

#### Using default `libp2p_rcmgr` metrics

Bespoke rcmgr metrics [were removed](https://github.com/ipfs/kubo/pull/9947), Kubo now exposes only the default `libp2p_rcmgr` metrics from go-libp2p.
This makes it easier to compare Kubo with custom implementations based on go-libp2p. Removed metrics:

```diff
-libp2p_rcmgr_memory_allocations_allowed_total
-libp2p_rcmgr_memory_allocations_blocked_total
-libp2p_rcmgr_peer_blocked_total
-libp2p_rcmgr_peers_allowed_total
```

If you depended on removed ones, please fill an issue to add them to the upstream [go-libp2p](https://github.com/libp2p/go-libp2p).

#### 📦️ Dependency updates

- update `boxo` to [v0.24.TODO](https://github.com/ipfs/boxo/releases/tag/v0.24.TODO)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
libp2p_rcmgr_memory_allocations_allowed_total
libp2p_rcmgr_memory_allocations_blocked_total
libp2p_rcmgr_peer_blocked_total
libp2p_rcmgr_peers_allowed_total
Loading