Skip to main content

JupyterLab extension replacing jupyter-resource-usage with a less intrusive, better implementation of resource usage monitoring

Project description

jupyterlab_resource_monitor_extension

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO Donate PayPal

JupyterLab extension that replaces jupyter-resource-usage with a less intrusive and better implementation of resource usage monitoring.

This extension is composed of a Python package named jupyterlab_resource_monitor_extension for the server extension and a NPM package named jupyterlab_resource_monitor_extension for the frontend extension.

Features

  • Memory monitor in the status bar - current memory usage with the maximum available memory shown alongside; under cgroup v2 this is the server's own cgroup, and without it the reading is host-wide
  • CPU usage in the status bar - live CPU utilization next to the memory indicator, as a percentage, a compact bar, or a grid; same scope as the memory reading
  • Per-core grid - the grid mode draws the cores assigned to this server as a square of cells, each gaining opacity with its own load and burning brighter past 75%, so a few pinned cores and an evenly busy machine look different at the same percentage
  • Kernel usage panel - sidebar panel showing memory and CPU for the kernel attached to the notebook you are looking at
  • Container aware - reads the cgroup v2 limits when present, so the ceiling shown is the container's limit rather than the host's RAM
  • Event-loop safe metrics collection - metrics are gathered off the tornado event loop, so polling never blocks websockets, kernel messages, or static file serving
  • Bounded collection cost - no synchronous recursive walk of the server's child process tree, so a large or leaked process population cannot degrade JupyterLab responsiveness
  • Measures kernels only while you are watching - the kernel panel samples solely while it is open, and stops entirely when it is closed
  • Drop-in replacement - designed to replace jupyter-resource-usage with a safer implementation

How the collection stays off the event loop, what bounds its cost, and how it degrades is described in How Resource Collection Avoids Blocking the Server.

Settings

Configure under Settings -> Settings Editor -> Resource Monitor.

Setting Default Effect
showMemory true Show the memory item in the status bar
showCpu true Show the CPU item in the status bar
showMemoryPercent false Append the used-of-limit percentage to the memory item
cpuMode normalised normalised shares all cores (0-100%), aggregate sums each core's own 100%, bar draws a filled bar, grid draws the cores as a square
showKernelUsage true Show the kernel usage sidebar panel

Hovering either status bar item shows the full detail regardless of these settings, including the memory percentage and the CPU core count.

Requirements

  • JupyterLab >= 4.0.0
  • Linux host - the sampler reads cgroup v2 and /proc; on macOS and Windows no reading is available, so the status bar items stay hidden and the kernel panel reports Measuring...

Install

To install the extension, execute:

pip install jupyterlab_resource_monitor_extension

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_resource_monitor_extension

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlab_resource_monitor_extension-1.0.27.tar.gz (340.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file jupyterlab_resource_monitor_extension-1.0.27.tar.gz.

File metadata

File hashes

Hashes for jupyterlab_resource_monitor_extension-1.0.27.tar.gz
Algorithm Hash digest
SHA256 6d3ba455dc66d4e4aa6e40da0f1f1289100014dc0967176d9532ca6b2a3123f0
MD5 747b3bddf08c35d429a74af08caa5de3
BLAKE2b-256 62c22772baa682b780aa8cef2f04e29cb28fe6db24d1e586f3b7f18dead0003d

See more details on using hashes here.

File details

Details for the file jupyterlab_resource_monitor_extension-1.0.27-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_resource_monitor_extension-1.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 1c2d77a588c9d2d5984ee4c46bb381857e4b8cb902fb34e210756b01ffda91a0
MD5 33b6cf8f92c173f97478bd84b286b980
BLAKE2b-256 3d123221b47bb7c2f67c1818200b6f4f190b7d507e99476b9b22cb1adc173a2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page