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

Bitswap client CPU hotspots #296

Open
hannahhoward opened this issue May 10, 2023 · 1 comment
Open

Bitswap client CPU hotspots #296

hannahhoward opened this issue May 10, 2023 · 1 comment
Labels
need/triage Needs initial labeling and prioritization

Comments

@hannahhoward
Copy link
Contributor

Goals

Under heavy load, we're seeing high CPU usage in Lassie originating in Bitswap. Looks like a couple functions are pretty heavy CPU consumers:

  • SessionInterestManager.RemoveSession
  • MessageQueue.ExtractOutgoingMessage (and Wantlist.Entries within it)
    This pushes us towards 700%+ CPU usage on a Saturn node that affects overall performance.

Pprof visualization:
profile001
Source data:
cpu.pprof.zip
Lassie binaries (this is from the x86_64 build we think):
https://github.com/filecoin-project/lassie/releases/tag/v0.9.2

I suspect these hotspots are pretty common to heavy bitswap client usage and are worth optimizing.

@hannahhoward hannahhoward added the need/triage Needs initial labeling and prioritization label May 10, 2023
@BigLep
Copy link
Contributor

BigLep commented May 17, 2023

Obviously not good to have these hotspots. Unless these are blocking anyone right now, I'm not planning for us to do them as part of the current Kubo/Boxo "0.21 iteration" given the other tasks we already have assigned. I am noting it for larger "bitswap overhaul" work that we want to sink into later in the year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
No open projects
Status: 🥞 Todo
Development

No branches or pull requests

2 participants