Track Memory and Storage Usage in JupyterHub
When running notebooks on Nautilus via JupyterHub, it’s helpful to monitor your RAM and disk usage, especially if you’re working with large datasets or resource-intensive computations.
Checking Memory Usage (RAM)
To check how much memory your notebook environment is using:
- Open an existing notebook
-
In a code cell, enter and run:
!free -h
Checking Storage/Disk Usage
- Open an existing notebook
-
In a code cell, enter and run:
!df -h
This command returns the disk space usage across mounted volumes, including:
- Your home directory (
/home/jovyan
) - Temporary or shared volumes (if applicable)
Tip: To free up space
- Delete unused
.ipynb
files or datasets in the file browser - Clear temporary variables in your notebook
- Use
%reset
ordel variable_name
in code to release memory