nbresuse reports total Jupyter server memory
See original GitHub issueIt looks like nbresuse is reporting the memory use for the entire server process, including all notebooks.
class MetricsHandler(IPythonHandler):
def get(self):
"""
Calculate and return current resource usage metrics
"""
config = self.settings['nbresuse_display_config']
cur_process = psutil.Process()
all_processes = [cur_process] + cur_process.children(recursive=True)
rss = sum([p.memory_info().rss for p in all_processes])
Is it possible to report memory use for each notebook individually? I don’t know anything about jupyter architecture, but maybe there’s a way to get a pointer to the calling notebook or PID?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Doesn't display memory value on my jupyter notebook #17
I've got a multi-user environment using the jupyter notebook on a server. ... right now nbresuse is used as the default for reporting...
Read more >Check your memory usage - The Littlest JupyterHub
It is shown in the top right corner of the notebook interface. Note that this is memory usage for everything your user is...
Read more >nbresuse - PyPI
Simple Jupyter extension to show how much resources (RAM) your notebook is ... Currently the server extension only reports memory usage (just RSS)...
Read more >Verifying the memory usage using nbresuse - Jupyter notebook
I have installed the Jupyter Extension nbresuse to verify memeory usage, but I struggle on how to display the memory limit (I can...
Read more >jupyter-resource-usage Changelog - pyup.io
([Full Changelog](https://github.com/jupyter-server/jupyter-resource-usage/compare/jupyter-server/ ... Report the memory usage metrics as prometheus metrics ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I mean, isn’t the total memory usage what you really care about, since bumping up against your system’s limits is what the concern is? I think one solution to get what you would like to see is to run dockerspawner through jupyterhub so that each notebook instance is in an isolated container. That way this extension should report the usage as a proportion of the total memory allocated to the container.
@jkleint yes per notebook metrics would roughly correspond to per kernel metrics (although there can be multiple notebooks sharing the same kernel).
This is great feedback. Would you like to continue the conversation in https://github.com/yuvipanda/nbresuse/issues/31? (and maybe link to you comment or copy the content over there)