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: Investigate performance speed #123

Open
dariusc93 opened this issue Dec 18, 2023 · 1 comment
Open

bitswap: Investigate performance speed #123

dariusc93 opened this issue Dec 18, 2023 · 1 comment
Labels
bug Something isn't working p:normal Normal Priority question Further information is requested

Comments

@dariusc93
Copy link
Owner

dariusc93 commented Dec 18, 2023

Bitswap (or beetle-bitswap) speed is rather low compared to kubo (and possibly js-ipfs/helia) when exchanging blocks between two rust-ipfs nodes, however the speed is much faster when exchanging blocks with a kubo node. Originally, it could have been due to how we process blocks in IpfsTask, however since a kubo node bitswap performance is much faster between rust-ipfs<->kubo, this may be more related to how blocks are sent out in the current implementation or requested from kubo.

Information (base on 256mb file in local network):
rust-ipfs<->rust-ipfs: ~103s
kubo<->rust-ipfs: ~9s
rust-ipfs<->kubo: ~38s

@dariusc93 dariusc93 added bug Something isn't working question Further information is requested p:low Low Priority labels Mar 21, 2024
@dariusc93
Copy link
Owner Author

With the internal bitswap implementation, the transfer is much faster, however that is only if rust-ipfs is requesting the block(s). If kubo is requesting the blocks, it takes longer to transfer. While debugging, it may be that kubo is hitting its internal timeout causing it to wait despite receiving the HAVE response. Not sure if this is a bug with go variant of bitswap or the way we handle passing messages (this havent been tested with beetle-bitswap or js-ipfs/helia bitswap). Might be solvable with #210 if its an issue with how we handle messages.

Note:

  • This regression does not appear for rust-ipfs to rust-ipfs nodes.

@dariusc93 dariusc93 added p:normal Normal Priority and removed p:low Low Priority labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p:normal Normal Priority question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant