MLOps Path

7.4.2 · блок 7

Эксплуатация Triton

Эксплуатация Triton

Зачем это нужно

Поднять Triton demo — полдела. Эксплуатация — GPU capacity, model reload без downtime, metrics, failure modes (CUDA OOM, wrong input shape). Этот урок для MLE/SRE: как Triton живёт в K8s неделями, не минутами demo.

Основные идеи

Lifecycle operations.

| Operation | Mechanism |

|-----------|-----------|

| Load model | Add to repo + `POST /v2/repository/models/{name}/load` |

| Unload | Free GPU memory |

| Hot swap version | New folder `2/`, load, switch traffic, unload `1/` |

| Full restart | Pod restart — brief outage unless multi-replica |

Health endpoints.

Configure K8s probes on ready after model load completes.

Metrics (Prometheus).

Key metrics (names may vary by version):

Dashboard: RED on API + USE on GPU (module 5.1).

GPU memory management.

Autoscaling.

Input validation errors. Wrong shape → 400; log request id, not full payload if PII. Alert spike in 4xx.

Multi-tenant Triton. One Triton per team vs shared platform Triton — isolation vs utilization tradeoff. Shared: quotas, separate model namespaces in repo, NetworkPolicy.

Security.

Backup. Model repo in object storage; config.pbtxt in Git. Pod ephemeral.

Как это выглядит на практике

Incident: p95 latency spike

1. Grafana: queue duration ↑, compute flat → input backlog, need more instances or batch tuning.

2. Grafana: GPU util 99%, compute ↑ → capacity — add replica or TensorRT optimize.

3. Error rate ↑ OOM → reduce instance_group count or model size.

Runbook excerpt:


Symptom: Triton Pod OOMKilled
1. kubectl describe pod → Last State OOM
2. Check config.pbtxt instance_group count
3. Reduce count or request larger GPU (A10 → A100)
4. Rollout via GitOps
5. Verify nv_gpu_memory_used_bytes stable 15 min

Rolling update with KServe.

Perf test before prod.

Что сделать после занятия

Официальные материалы

Открыть интерактивную версию