#engineer #ml #monitor #gpu #cpu-gpu #cpu-memory #exit

app mltop

Resource monitor for ML engineers written in Rust

1 unstable release

new 0.1.0 Feb 23, 2025

#19 in #engineer

MIT license

170KB
734 lines

mltop

demo

Introduction

mltop is a resource monitoring tool designed specifically for Machine Learning Engineers and those working with ML tasks. It was a born as a hybrid of nvtop (for monitoring GPUs) and htop (for monitoring CPU and memory), allowing users to see a comprehensive view of their system’s performance in a single interface.

Key Features

  • Dual Resource Monitoring: Overlays CPU and GPU usage for spotting bottlenecks in your dataloader pipelines.
  • Simplified UI: Combines the key features of htop and nvtop, so you don't need to open multiple tools.

mltop requires NVIDIA drivers to monitor NVIDIA GPU information.

mltop is written in Rust.

Installation

You can easily install mltop via pre-built binaries or by compiling from source.

Pre-built Binaries

  • Visit the releases page to download the latest precompiled binaries for your operating system.

Building from Source

  1. Make sure you have Rust (Cargo) installed.

  2. Clone the repository:

git clone https://github.com/kikefdezl/mltop.git
cd mltop
  1. Build & run the project:
cargo run --release

Dependencies

  • mltop uses nvml_wrapper to fetch NVIDIA GPU information, which requires interfacing with your NVIDIA Drivers. If those are not available, mltop won't be able to find your GPU.

Currently, only NVIDIA GPUs are supported, but support for different GPUs is in the roadmap.

Usage

Once installed, run mltop in your terminal. The tool will run until you press q to quit.

Roadmap

  • Sorting processes by GPU/CPU/MEM usage
  • Killing processes
  • Support for multiple GPUs
  • Support for other GPU vendors (AMD, Intel, etc.)
  • Interactive customization of UI/UX

Contributing

I welcome contributions to mltop! Especially those aimed towards supporting hardware I don't have access to. If you'd like to contribute, please follow these steps:

  • Fork the repository.
  • Clone your fork and create a new branch.
  • Make your changes and add tests if applicable.
  • Commit your changes with clear messages.
  • Submit a pull request.

Code of Conduct

By contributing to this project, you agree to abide by the Code of Conduct.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Thanks to the creators of htop, nvtop, for for inspiring this project, and to the developers of crossterm, ratatui, sysinfo & nvml_wrapper for providing the building blocks.

Contact

For any questions or feedback, feel free to reach out via GitHub Issues.

Dependencies

~8–34MB
~528K SLoC