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

Performance issues #1357

Open
KostyaLocal opened this issue Mar 12, 2024 · 3 comments
Open

Performance issues #1357

KostyaLocal opened this issue Mar 12, 2024 · 3 comments

Comments

@KostyaLocal
Copy link

Hello, I am using Bybit and Binance packages. Binance consumes almost 10 times more CPU time, profiler shows the time in waiting for data in sockets. Can you check ?

@JKorf
Copy link
Owner

JKorf commented Mar 12, 2024

Hi, both libraries use the same websocket mechanic under the hood, assuming you're using the latest versions. Could it be that Binance just processes more data?
If you can provide some more context I can have a look:

Library version numbers?
Which subscriptions are you using on both libraries?
Is this happening immediately or after some time?

@KostyaLocal
Copy link
Author

KostyaLocal commented Mar 12, 2024

Could it be that Binance just processes more data?

No. I am using Binance UsdFuturesApi's SubscribeToUserDataUpdatesAsync + SubscribeToKlineUpdatesAsync, the last one has update frequency 250ms

Bybit: SubscribeToOrderUpdatesAsync, SubscribeToPositionUpdatesAsync, SubscribeToWalletUpdatesAsync (V5PrivateApi), SubscribeToCandleUpdatesAsync (V5LinearApi)
Bybit has 100ms frequency updates on candles

Versions are latest from nuget: binance 9.6.1, bybit 3.6.1

@KostyaLocal
Copy link
Author

KostyaLocal commented Mar 12, 2024

I can't figure out what the function is. The load is immediately high after subscribing to updates.
On a normal pc/laptop cpu usage is not felt, but when the application runs in the cloud on 1 shared CPU, the difference is noticeable
Screenshot_9

upd:
Connected the debugging symbols
[External Call]
System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart() 2379 (34,93 %) 1150

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