Show cpu limit
jtpio opened this issue · 9 comments
The number of available cpus could be shown to the user as in a tooltip, or next to the percent value.
i put the number of CPUs in the config, but the CPU display still shows 100% if only one of my cores goes to 100, is that as designed?
The number of CPUs is not taken into account at the moment and is not displayed in the UI.
The value comes from nbresuse
which uses psutil
to retrieve the metrics:
- https://github.com/yuvipanda/nbresuse/blob/dd2d21c0832cd7d8e41b91b2e8782e8eda11464b/nbresuse/__init__.py#L34
- https://psutil.readthedocs.io/en/latest/#psutil.Process.cpu_percent
So yes the value can be greater than 100% but in that case it will be capped.
Hello,
Which spawner does the toolbar support to display cpu metricts. We currently tried using this extension using a classical single user spawner but the cpu consumption is not shown and the memory does not look the same as the screenshot in the the readme :
we are using latest jupyterlab Version 2.1.1 in our tests.
Thanks !
Most of the spawners should be supported, since the configuration is on the user notebook server.
For the CPU usage, is track_cpu_percent
enabled? https://github.com/jtpio/jupyterlab-system-monitor#graphic-display
Most of the spawners should be supported, since the configuration is on the user notebook server.
For the CPU usage, is
track_cpu_percent
enabled? https://github.com/jtpio/jupyterlab-system-monitor#graphic-display
hello, yes,
We are running latest Version 2.1.1 Jupyterlab
c.Spawner.cmd = ['jupyterhub-singleuser']
c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True
c.NotebookApp.ResourceUseDisplay.cpu_limit = 2
It is enabled but it does not display any cpu metrics, just the ram.
thanks
Florin
And with the following config?
c.Spawner.args = [
"--ResourceUseDisplay.track_cpu_percent=True",
"--ResourceUseDisplay.cpu_limit=2"
]
And with the following config?
c.Spawner.args = [ "--ResourceUseDisplay.track_cpu_percent=True", "--ResourceUseDisplay.cpu_limit=2" ]
yes, this seems to have done the trick :D thank you !
Great!
Maybe we could add some documentation about using this with JupyterHub in the README? Otherwise another candidate would be the nbresuse
repo.
Closing as this would have to be implemented in https://github.com/jupyter-server/jupyter-resource-usage.