coinapi-sdk
coinapi-sdk copied to clipboard
Go client high CPU load
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 EOFor 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?
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.