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

[ipfs/go-bitswap] Improve (CPU) performance when rebroadcasting wants #113

Open
Stebalien opened this issue Jul 5, 2019 · 1 comment
Open
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@Stebalien
Copy link
Member

When we can't find anything for a while, we add all outstanding wants to a "broadcast" wantlist. Unfortunately, we repeatedly do this. Fortunately, we don't re-send "want" messages but repeatedly adding all idle wants to every peer's wantlist incurs a high CPU cost.

We've partially fixed this in ipfs/go-bitswap#133 by doing this less frequently but we can do better.

  1. If it's already in the broadcast wantlist, don't bother "sending" the message.
  2. Only add new idle wants? Extra state we need to track but may be worth it.
@Stebalien Stebalien added the kind/enhancement A net-new feature or improvement to an existing feature label Jul 5, 2019
@Stebalien Stebalien mentioned this issue Jul 12, 2019
51 tasks
@Stebalien
Copy link
Member Author

Can confirm that this is still an issue under heavy load.

@Jorropo Jorropo changed the title Improve (CPU) performance when rebroadcasting wants [ipfs/go-bitswap] Improve (CPU) performance when rebroadcasting wants Jan 27, 2023
@Jorropo Jorropo transferred this issue from ipfs/go-bitswap Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant