-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
server high CPU load #32
Comments
Have you tried profiling? I find vmprof particularly useful because it combines low-overhead, useful visualization, and a nice web interface so you can share profiles with other people. (Do be warned if you have proprietary code though that it uploads some data to the web, which is why it can do the nice sharing but OTOH some people get antsy.) Basically:
|
Did you install |
Yes, wsaccel installed. I checked and it doesn't make any difference. |
I'm seeing high CPU load of the server relative to my current implementation, which is running https://github.com/dpallot/simple-websocket-server via trio.run_sync_in_worker_thread().
The workload is many small messages, typically < 80 bytes, mostly one-way communication. trio-websocket consumes 2-3x more CPU.
with simple-websocket-server the sends are synchronous, so no backpressure, but it means that the Trio scheduler is much less used
The text was updated successfully, but these errors were encountered: