jupyterhub / jupyterhub-idle-culler

JupyterHub service to cull idle servers and users
Other
102 stars 37 forks source link

Customize decision on culling #45

Closed rccern closed 2 years ago

rccern commented 2 years ago

Proposed change

In our Jupyterhub deployment we have the possibility of assigning users to nodes with GPU, which are a "scarce" resource. For this reason, we would like to have different timeouts depending on which resources the users have booked, e.g. letting sessions expire after 2h since last_activity for nodes with GPUs and 6h for nodes using only CPU.

Alternative options

Implement this in another culler that we keep for our deployment

Who would use this feature?

Admins who desire to customize the culler behaviour. Use cases include reserving resources for shorter periods of time for some type of resources, a longer period for users with a specific role...

(Optional): Suggest a solution

I was thinking about customizing the should_cull https://github.com/jupyterhub/jupyterhub-idle-culler/blob/main/jupyterhub_idle_culler/__init__.py#L238 with a configurable callable which takes as inputs the user and the server objects and returns a boolean. Does it make any sense?

welcome[bot] commented 2 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

rccern commented 2 years ago

I noticed only after publishing that this is essentially a duplicate of #25 , let me know if you prefer that I close this one and continue the discussion there

manics commented 2 years ago

https://github.com/jupyterhub/jupyterhub-idle-culler/issues/25 or one of the issues linked there is definitely the best place. Would you mind copying your use case there? Thanks!