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

Document and possibly facilitate using the notebook's internal culling #2032

Closed
minrk opened this issue Jul 12, 2018 · 4 comments
Closed

Document and possibly facilitate using the notebook's internal culling #2032

minrk opened this issue Jul 12, 2018 · 4 comments

Comments

@minrk
Copy link
Member

minrk commented Jul 12, 2018

The notebook has its own internal idle-culling mechanisms, including shutting down idle kernels, shutting down itself when there's been no activity, and making decisions based on whether there are open connections or not. This is a lot more sophisticated, and offers much more granularity than the network-activity-based activity we have now.

For reference, we enable this config on mybinder.org. We should at least document how to set these values in notebook config.

As a second measure, we could consider if there are good ways to set these values in jupyterhub config (there may not be), such as using SingleUserNotebookApp to allow them to be set via env and simplified flags for idle shutdown strategies.

Additionally, we might update our activity tracking to use this data, so that each notebook periodically notifies the Hub of its 'current activity', so that idle-culling from the Hub API can make more informed decisions.

@kshitija08
Copy link
Contributor

@minrk I would like to contribute to this issue.

@tuhina2020
Copy link
Contributor

Hi @minrk . I am sorry for a delayed response. I need some clarification. Do let me know if I am on the right track.

https://github.com/jupyterhub/jupyterhub/blob/master/docs/source/getting-started/services-basics.md

Culling is implemented as an external service that checks for idle servers at a certain interval
https://github.com/jupyterhub/jupyterhub/blob/master/examples/cull-idle/cull_idle_servers.py#L312

https://github.com/jupyterhub/jupyterhub/blob/master/docs/source/reference/config-user-env.md#example-enable-a-jupyter-notebook-configuration-setting-for-all-users

A secondary way to configure notebook in SingleUserNotebook would be to have a default cull_time_out value set using environment variables like so. https://github.com/jupyterhub/jupyterhub/blob/master/jupyterhub/singleuser.py#L256

@kshitija08
Copy link
Contributor

@tuhina2020 @minrk Hey . Is this issue available to work on. I would like to help in this.

@consideRatio
Copy link
Member

For reference, we enable this config on mybinder.org. We should at least document how to set these values in notebook config.

This isn't done here in the jupyterhub/jupyterhub project, but the jupyterhub-idle-culler is now a standalone project that documents it in its README here: https://github.com/jupyterhub/jupyterhub-idle-culler#how-it-works

As a second measure, we could consider if there are good ways to set these values in jupyterhub config (there may not be), such as using SingleUserNotebookApp to allow them to be set via env and simplified flags for idle shutdown strategies.

I think there are some good options for various deployments of JupyterHub to provide configuration files overall, doing that directly is probably the way to go than supporting all the options via environment variables.

Additionally, we might update our activity tracking to use this data, so that each notebook periodically notifies the Hub of its 'current activity', so that idle-culling from the Hub API can make more informed decisions.

This is done I think.


I think this issue can be closed as resolved. I'll go for a close, please feel free to open a new issue with an idea of improvement to documentation etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants