Memory and CPU limits are not shown

I’m following Resize the resources available to your JupyterHub — The Littlest JupyterHub v0.1 documentation to display CPU and RAM limits per user, but nothing shows on the interface.

This is my current configuration:

root@jupyterhub:~# tljh-config show
  - root
  enabled: true
  default_app: jupyterlab
  memory: 1G
  cpu: 1

I did a tljh-config reload hub already, but even though the extension is enabled:


I don’t see any RAM or CPU indication on JupyterLab:


According to the documentation of jupyter-resource-usage, MEM_LIMIT and CPU_LIMIT are set by JupyterHub “if using a spawner that supports it”. However, if I try to read those two variables from os.environ, they’re not there.

I am not sure if this is a problem in jupyter-resource-usage (Not showing · Issue #85 · jupyter-server/jupyter-resource-usage · GitHub ?), JupyterHub, or something else.

How can I troubleshoot this myself and try to narrow down the problem a bit?

I don’t have experience here, but some quick ideas that might help troubleshooting:

That’s a screenshot frontentend extension. What about the server extension? What is the output of:

jupyter serverextension list


jupyter server extension list

What about echo in terminal? Not everything ends up being passed to kernel I think.

Thanks @krassowski, this was indeed very helpful. I see that the jupyter_resource_usage was missing - same happened with other packages as I upgraded the Python version, and I restored them manually until everything worked, but I was missing this one.

After mamba install jupyter-resource-usage, everything is working normally again:

Oh indeed! The variables are there. I incorrectly assumed they would be passed to the kernel.$ echo $MEM_LIMIT
1073741824$ echo $CPU_LIMIT

Problem solved :white_check_mark:

1 Like