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

Rust peer exhausting resources #135

Open
2color opened this issue May 3, 2024 · 1 comment
Open

Rust peer exhausting resources #135

2color opened this issue May 3, 2024 · 1 comment
Labels
rust Pull requests that update Rust code

Comments

@2color
Copy link
Collaborator

2color commented May 3, 2024

Problem

Every since #114 was merged and the Rust peer is now part of the IPFS Kademlia DHT, it's resource consumption has spiked significantly. It's running on a pretty beefy machine (32GB RAM), yet manages to eat up the CPU cycles from the moment it starts:

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1687 root      20   0 1384924   1.0g  33812 S 650.3   3.3  11:30.25 rust-libp2p-web
   1718 root      20   0 2651788 131636  22300 S   2.7   0.4   0:11.17 go-peer

Especially when compared to the go-peer (which also joins the IPFS DHT as a DHT Server)

Potential solutions

It's probably sensible to figure out why the Rust peer is consuming so much resources in order to come up with solutions. We know that this problem started every since it joined the IPFS DHT and connected to the bootstrap nodes.

It may be sensible to instrument the code to figure out why this is happening, in addition to adding some connection limits and having a look at https://github.com/libp2p/rust-libp2p/tree/master/misc/server as a comparison rust-libp2p DHT Server.

@2color 2color added the rust Pull requests that update Rust code label May 3, 2024
@2color
Copy link
Collaborator Author

2color commented May 3, 2024

@p-shahi Any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

1 participant