Skip to content

Commit

Permalink
refactor(rcmgr): use default libp2p rcmgr metrics (#9947)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Rataj <[email protected]>
  • Loading branch information
marten-seemann and lidel authored Nov 27, 2024
1 parent fa769f7 commit 778a418
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 260 deletions.
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.

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

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.
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

0 comments on commit 778a418

Please sign in to comment.