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

100% CPU usage on idle #15

Open
tsurai opened this issue Jul 11, 2019 · 2 comments
Open

100% CPU usage on idle #15

tsurai opened this issue Jul 11, 2019 · 2 comments

Comments

@tsurai
Copy link

tsurai commented Jul 11, 2019

Hi,

I'm having a problem with the zmq sockets causing a very high load.
All of the Zmq sockets idle at 100% CPU per thread once the first future has started despite not having any load on it whatsoever. My project ends up causes a huge CPU load since I'm using several sockets at once and they all cause a thread to idle at max CPU speed rendering the whole system unusuable.
Is there any way this could be fixed?

@asonix
Copy link
Owner

asonix commented Jul 11, 2019

can you provide which version of tokio-zmq you're using, and a minimal example that exhibits this behavior?

@tsurai
Copy link
Author

tsurai commented Jul 11, 2019

I'm using version 0.10.1 as stated on crates.io but can also replicate it on the current sources in the development branch.

I can reproduce it by taking the dealer_router example code and remove the controlled() calls on the dealer and router stream of the broker to keep them open. Running the example like this causes a thread to idle on 100% cpu after all messages were processed.

Thanks a lot for looking into this

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

2 participants