-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Lower select timeout #263
Lower select timeout #263
Conversation
Having them as class variables didn't have any observable issues, but it couldn't possibly have been correct.
The previous code was checking whether it had been self.delay seconds since the last check, not whether it had been self.delay seconds since we started delaying.
The various deferring classes in http.py would try to delay by 0.1 seconds when data was not yet ready. However, since the select timeout was 1 second, we'd end up delaying that long, instead. This amounted to each start or stop command taking 1 second to complete. The comment about the minimum timeout appears to have never been true.
Any feedback here? We'd like to push this upstream as it significantly improves service start and stop times. |
+1 This pull solved a tremendous scalability headache for me when automating, via configuration management, restarting large numbers of processes in a group (64+). |
Note to self: need to check CPU usage of otherwise idle supervisord after trying to merge this. |
Related: #131 |
I'm afraid I'll have to pass on this pull request, because, while it does help things start and stop faster, it's treating the symptom instead of the cause. The commit at 50d1857 represents a more involved way to make things start and stop faster without requiring that the select timeout be dropped. Hopefully I'll be able to merge it to master soon, once its tests pass. |
@mcdonc: I agree with you that the root cause is not related to select timeout. I also tested This is my
I think there are some reasons as follows:
From 1. 2. and 3. we see that dispatcher object which has type It would be very nice if we can fix
I think now |
@ngocson2vn nice analysis and fix! I'll commit it to the https://github.com/Supervisor/supervisor/tree/feature.faststartstop branch |
50d1857 is also now merged to master, FTR, which represents the "more involved" way to make starting and stopping processes much faster |
This pull request fixes the previous issue with
supervisorctl stop
hanging.