-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Deployment with 1 worker always consumes 0.1 cpu #152
Comments
Confirmed. Exact figures depends on the hardware of course. In my case (oracle cloud / AMD EPYC) single process eats as high as ~4-8% while idle! In comparison same code with FastAPI/uvicorn consumes about 0.1-0.2% (while idle). That's pretty high... (doesn't seem to be scalable). |
I see this too, about .1 cpus consistently |
Author is aware of the problem, it might be a good idea to add some kind of config option. Look for Loop._keep_alive() here and increase the relaxed state callback time from 0.001 to something sensible according to you use-case: |
Thanks for this, really helps! I have patched the method locally to reduce the cpu usage and will see how it affects functionality and performance. |
A basic deployment on AWS shows that socketify consumes 0.11-0.12 cpus while idle. The same applies locally while other applications almost don't consume any cpu at all.
The text was updated successfully, but these errors were encountered: