Skip to content

Provider performance regression #10777

@gammazero

Description

@gammazero

Checklist

Installation method

built from source

Version

v0.34.1

Config

Description

There is a reported performance regression betweek Kubo v0.32.1 (boxo v0.24.3) and Kubo v0.34.1 (boxo v0.29.1)

Initial Report

From: @acejam

The issue: We have a handful of Kubo nodes that are receiving a significant level of add 's per second and ultimately each bulk reprovide run takes too long, causing a snowball effect when the next run kicks off. The net result is a delay in making a DHT announcement.

Bitswap Config

"Internal": {
    "Bitswap": {
      "EngineBlockstoreWorkerCount": 600,
      "EngineTaskWorkerCount": 600,
      "MaxOutstandingBytesPerPeer": 20971520,
      "ProvideEnabled": true,
      "TaskWorkerCount": 600
    }
  },

Build Latest boxo (main branch)

Built the latest commit from boxo into Kubo 0.34.1 and it did not produce any improvement unfortunately.

Conclusion

@acejam Confirmed that downgrading to Kubo 0.32.1 improves providing performance significantly - probably a 1000x+ gain. Based on the fullrtdht logs, it appears that both bulkMessageSend() and Provide() are called in fullrt/dht.go - leading to possibly two announcements per key?
From what I can tell, bulkMessageSend() still runs very slowly, but the extra Provide() call (which is not called in latest kubo/boxo) appears to be helping tremendously.

Possible Areas to investigate

It is worth noting that the kubo v0.33.0 release notes state:

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.

It may also be reasonable to look for opportunities for horizontal scaling (i.e. adding more concurrent workers doing provide work), to ensure each Kubo announces fast enough

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions