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 client high CPU load #118

Open
arniwesth opened this issue Aug 5, 2021 · 1 comment
Open

Go client high CPU load #118

arniwesth opened this issue Aug 5, 2021 · 1 comment

Comments

@arniwesth
Copy link

arniwesth commented Aug 5, 2021

Environment:
OS: Linux Mint 20.1
Kernel: 5.4.0-80-generic
CPU: Intel© Core™ i7-2600K CPU @ 3.40GHz × 4
Mem: 24 GB 

I'm testing the Go websocket client, but are having some issues. When subscribed to all trades (production feed):

  • Just receiving (no further processing) causes a CPU usage of 110-120%
  • After a while, the connection will close with either an Unexpected EOF or being closed because too many messages are buffered by the sender.

When running the C# websocket client (targeting net5.0) on the same environment and subscribing to all trades, the CPU usage is ~20-40% and it seems to be more stable.

When running the Python websocket client on the same environment, the CPU usage is ~35-50%

I would have assumed the Go client to be at least as efficient as the C# client and more efficient than Python. Any thoughts on this?

@arniwesth arniwesth changed the title Go client inefficient? Go client high CPU load Aug 6, 2021
@marvin-hansen
Copy link
Contributor

Yes, that's correct. I'm working currently on an improved go WS client as there a multiple issues with the current implementation which wasn't stress tested.

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

No branches or pull requests

3 participants