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
chat and chat-tokio examples: high CPU consumption (Ubuntu 20.04) #2675
Comments
Thanks for the report. https://github.com/tokio-rs/console might help here debugging the issue. Help greatly appreciated. |
In the previous version of the code the readable and writable functions were running constantly causing high CPU consumption constantly when using tokio as runtime. Fix libp2p#2591 Fix libp2p#2675
In the previous version of the code the readable and writable functions were running constantly causing high CPU consumption constantly when using tokio as runtime. Fix libp2p#2591 Fix libp2p#2675
@ddeguglielmo with the latest changes to |
Hello @mxinden, |
Wonderful. Thanks @ddeguglielmo for testing. And of course @gallegogt and @thomaseizinger for fixing this issue! |
Summary
Both chat and chat-tokio examples have very high CPU consumption (close to 100%).
Expected behaviour
I do not expect the examples to have such an high CPU consumption when no messages are exchanged.
Actual behaviour
I have two instances of chat (chat-tokio) example running on the same machine. After the publication of the first message by part of the first peer (that is correctly received by the second one), the CPU consumption of the processes increases significantly and reaches 100%.
Possible Solution
When we tested the same examples on a machine running macOS, we have not observed such an high CPU usage.
Version
Would you like to work on fixing this bug?
Yes.
The text was updated successfully, but these errors were encountered: