Azure / Moneo

Distributed AI/HPC Monitoring Framework
MIT License
25 stars 16 forks source link

Moneo

Description

Moneo is a distributed GPU system monitor for AI workflows. It orchestrates metric collection (DCGMI + Prometheus DB) and visualization (Grafana) across multi-GPU/node systems. This provides useful insights into workflow and system level characterization.

Moneo offers flexibility with 3 deployment methods:

  1. The prefered method using Azure Managed Prometheus/Grafana and Moneo linux services for collection (Headless deployment)
  2. Using Azure Application Insights/Azure Monitor Workspace(AMW) (Headless deployment w/ App Insights).
  3. Using Moneo CLI with a dedicate headnode to host local Prometheus/Grafana servers (Local Grafana Deployment)

Moneo Headless Method:

image

Metrics There five categories of metrics that Moneo monitors: 1. GPU Counters - Compute/Memory Utilization - SM and Memory Clock frequency - Temperature - Power - ECC Counts (Nvidia) - GPU Throttling (Nvidia) - XID code (Nvidia) 2. GPU Profiling Counters - SM Activity - Memory Dram Activity - NVLink Activity - PCIE Rate 3. InfiniBand Network Counters - IB TX/RX rate - IB Port errors - IB Link FLap 4. CPU Counters - Utilization - Clock frequency 5. Memory - Utilization
Grafana Dashboards 1. Menu: List of available dashboards. ![image](https://user-images.githubusercontent.com/107515145/195170743-0b4755b5-f97f-4a00-883f-0560400620f9.png) Note: When viewing GPU dashboards make sure to note whether you are using Nvidia or AMD GPU nodes and select the proper dashboard. 2. Cluster View: contains min, max, average across devices for GPU/IB metrics per VM. ![image](https://user-images.githubusercontent.com/70273488/186491238-ce032f87-cab1-41c4-b32e-9826b8c47b72.png) ![image](https://user-images.githubusercontent.com/70273488/186491363-3a6cdb8d-0d95-4deb-a6b0-e28711f1ba56.png) 3. GPU Device Counters: Detailed view of node level GPU counters. ![image](https://user-images.githubusercontent.com/70273488/173664219-43d8d7b7-a4e6-440a-8373-89ca388ce563.png) 4. GPU Profiling Counters: Node level profiling metrics require additional overhead which may affect workload performance. Tensor, FP16, FP32, and FP64 activity are disabled by default but can be switched on by CLI command. ![image](https://user-images.githubusercontent.com/70273488/173661651-2aa3d586-3889-45f9-81e7-c8140fb19405.png) 5. InfiniBand Network Counters: Detailed view of node level IB network metrics. ![image](https://user-images.githubusercontent.com/70273488/173664809-bbfea8b4-91cb-42cd-aff8-a91fc9006120.png) 6. Node View: Detailed view of node level CPU, Memory, and Network metrics. ![image](https://user-images.githubusercontent.com/107515145/195173202-8812a46a-4334-4e52-87ba-3c3137711bdd.png)

Minimum Requirements

Manager Node Requirements

Note: Not applicable if using Azure Managed Grafana/Prometheus

Worker node requirements

Usage

Deploying Moneo

Get the code:

Configuration File

The moneo_config.json file can be used to specify certain deployment settings prior to moneo deployment.

There are 4 groups of configurations:

  1. exporter_conf - This applies to all deployments. See the following settings:
    • gpu_sample_interval - Sample rate per minute for Nvidia GPU exporter. Choices are [1, 2, 30, 60, 120, 600]. with 60 samples per minute being default.
    • gpu_profiling - Switches on additional profile metrics (Tensor, FP16, FP32, and FP64). Choices are true/false with false as default.
    • Note: These settings may have an impact on performance. Default settings were chosen to minimize impact.
  2. prom_config - This group of settings applies to the Headless deployment method. Refer to Headless Deployment Guide for usage.
  3. geneva_config - Applies to Geneva deployement. Refer to Geneva deployment for usage.
  4. publisher_config - Applies to both Geneva and Azure Monitor agent deployment methods see Geneva deployment or Azure Monitor Agent deployment for usage.

Prefered Moneo Deployment

The prefered way to deploy Moneo is the headless method using Azure Managaed Grafana and Prometheus resources.

Complete the steps listed here: Headless Deployment Guide

Alternative deployment using Moneo CLI and head node

This method requires a deploying of a head node to host the local Prometheus database and Grafana server.

Complete the steps listed here: Local Grafana Deployment Guide

Moneo CLI

Moneo CLI provides an alternative way to deploy and update Moneo manager and worker nodes. Although linux services are prefered this offers an alternative way to control Moneo.

CLI Usage

Note: For more options check the Moneo help menu

    python3 moneo.py --help

Access the Grafana Portal

User Docs

Known Issues

Troubleshooting

  1. For Managed Grafana (headless) deployment

    • Verify that the user managed identity is assigned to the VM resource.
    • Verify the prerequisite configure file (Moneo/moneo_config.json) is configured correctly on each worker node.
    • On the worker nodes verify functionality of prometheus agent remote write:
      • Check prometheus docker with sudo docker logs prometheus | grep 'Done replaying WAL' It will have the result like this:
        ts=2023-08-07T07:25:49.636Z caller=dedupe.go:112 component=remote level=info remote_name=6ac237 url="<ingestion_endpoint>" msg="Done replaying WAL" duration=8.339998173s
    • Check Azure Grafana's is linked to Azure Prometheus workspace.
      • This can be done by accessing settings in Grafana dashboard and ensuring the ingestion link for the Managed Prometheus is being used for the datasource url.
      • You can also verify The Managed Prometheus resource in the portal is linked with the managed Grafana resource image
  2. For deployments with a Headnode:

  3. All deployments:

    • Verifying exporters on worker node:

      • ps -eaf | grep python3

      image

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.