Skip to main content
Version: Next

Observability

HAMi reports two views of every GPU. The allocation view shows what the scheduler has handed out. The usage view shows what containers actually use. Both are Prometheus metrics.

Where HAMi allocation and usage metrics come from Where HAMi allocation and usage metrics come from

Allocation view​

The HAMi scheduler serves allocation metrics at <scheduler-ip>:31993/metrics. They come from the scheduler's own records of which Pod holds which share.

MetricShows
hami_gpu_memory_allocated_bytesMemory allocated on each card
hami_gpu_core_allocated_ratioCompute allocated on each card
hami_gpu_shared_countNumber of containers sharing each card
hami_vgpu_memory_allocated_bytesMemory allocated to each container

Usage view​

HAMi-Core records each container's memory and compute use in a shared cache file on the node. The vGPU monitor in the hami-device-plugin Pod reads those files and serves usage metrics at <gpu-node-ip>:31992/metrics.

MetricShows
hami_vgpu_memory_used_bytesMemory each container uses on a card
hami_container_device_utilization_ratioCompute each container uses
hami_host_gpu_utilization_ratioCompute used on each card, for the whole host
hami_host_gpu_memory_used_bytesMemory used on each card, for the whole host

DCGM Exporter can run next to HAMi and add the card's physical counters, such as temperature and power.

Why the two views differ​

A Pod that asks for 8192 MiB and loads a small model may use 2100 MiB. The allocation view counts 8192 MiB, and the usage view shows 2100 MiB. A large gap means the Pod asks for more than it needs, and the card could hold more Pods.

The gap can also go the other way. A container with CUDA_DISABLE_CONTROL=true runs without HAMi-Core and is not held to its share. The host metrics can then show more memory in use on a card than the scheduler allocated.

Dashboards​

  • Grafana dashboard: capacity, allocation, and usage panels for the whole cluster
  • HAMi WebUI: a web console that reads the same metrics from Prometheus

Learn more​

CNCFHAMi is a CNCF Incubating project