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

go-libp2p-secio using significant CPU resources #2689

Closed
prestonvanloon opened this issue May 24, 2019 · 4 comments
Closed

go-libp2p-secio using significant CPU resources #2689

prestonvanloon opened this issue May 24, 2019 · 4 comments

Comments

@prestonvanloon
Copy link
Member

prestonvanloon commented May 24, 2019

When profiling the running beacon chain node, we are seeing secio consume the majority of resources in the node.

Here are a few 30s samples of the running beacon node.

pprof.image.binary.samples.cpu.019.pb.gz
pprof.image.binary.samples.cpu.020.pb.gz
pprof.image.binary.samples.cpu.021.pb.gz

View these samples with the go pprof tool.

go tool pprof -http 0.0.0.0:9000 /path/to/pprof.image.binary.samples.cpu.021.pb.gz

Then view at http://0.0.0.0:9000

We have tried turning off secio with libp2p.NoSecurity but we faced issues and had to revert.
See: #2622 #2633

I don't recall the specific issue, but we couldn't get nodes to peer and communicate. Will follow up on that in another issue.

@prestonvanloon
Copy link
Member Author

cc: @djrtwo

@djrtwo
Copy link

djrtwo commented May 28, 2019

cc @raulk

@raulk
Copy link

raulk commented May 30, 2019

Thanks for attaching CPU profiles! On mobile now and can’t open; will look tomorrow. We merged native OpenSSL RSA crypto support under the “openssl” build tag a few weeks ago: libp2p/go-libp2p-crypto#61. It’s 3x faster than the go sdk. I wonder if that’s your bottleneck though, as this only manifests when under heavy load (e.g. relay nodes piping traffic for some 100k peers).

@rauljordan
Copy link
Contributor

We have not seen this in ages, closing unless it becomes noteworthy again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants