{
  "uid": "qwen-l20-evidence-kpa",
  "title": "Qwen L20 · KPA 配置下的实际容量",
  "schemaVersion": 39,
  "version": 1,
  "tags": [
    "AIBrix",
    "Qwen3.8",
    "L20",
    "light"
  ],
  "style": "light",
  "timezone": "Asia/Shanghai",
  "refresh": "",
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "editable": true,
  "panels": [
    {
      "id": 2,
      "title": "期望 / 可用副本",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 0,
        "w": 12,
        "h": 9
      },
      "targets": [
        {
          "refId": "A",
          "expr": "kube_deployment_spec_replicas{namespace=\"inference-lab\",deployment=\"qwen38-aibrix-lab\"}",
          "legendFormat": "期望副本",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          }
        },
        {
          "refId": "B",
          "expr": "kube_deployment_status_replicas_available{namespace=\"inference-lab\",deployment=\"qwen38-aibrix-lab\"}",
          "legendFormat": "可用副本",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 6,
            "spanNulls": false
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "calcs": [
            "lastNotNull",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi"
        }
      }
    },
    {
      "id": 4,
      "title": "运行 / 等待请求",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 0,
        "w": 12,
        "h": 9
      },
      "targets": [
        {
          "refId": "A",
          "expr": "sum(vllm:num_requests_running{job=\"qwen-lab-engine\",model_name=\"qwen38-aibrix-lab\"})",
          "legendFormat": "运行",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          }
        },
        {
          "refId": "B",
          "expr": "sum(vllm:num_requests_waiting{job=\"qwen-lab-engine\",model_name=\"qwen38-aibrix-lab\"})",
          "legendFormat": "等待",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 6,
            "spanNulls": false
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "calcs": [
            "lastNotNull",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi"
        }
      }
    },
    {
      "id": 5,
      "title": "客户端 TTFT 与 E2E",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 9,
        "w": 12,
        "h": 9
      },
      "targets": [
        {
          "refId": "A",
          "expr": "histogram_quantile(0.95,sum by(le)(rate(qwen_lab_ttft_seconds_bucket{job=\"qwen-lab-client\",phase=~\"kpa-min2-wave\"}[1m])))",
          "legendFormat": "TTFT P95",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          }
        },
        {
          "refId": "B",
          "expr": "histogram_quantile(0.95,sum by(le)(rate(qwen_lab_e2e_seconds_bucket{job=\"qwen-lab-client\",phase=~\"kpa-min2-wave\"}[1m])))",
          "legendFormat": "E2E P95",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "s",
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 6,
            "spanNulls": false
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "calcs": [
            "lastNotNull",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi"
        }
      }
    },
    {
      "id": 7,
      "title": "Pod Ready 数",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 9,
        "w": 12,
        "h": 9
      },
      "targets": [
        {
          "refId": "A",
          "expr": "sum(kube_pod_status_ready{namespace=\"inference-lab\",pod=~\"qwen38-aibrix-lab-.*\",condition=\"true\"})",
          "legendFormat": "Ready",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          }
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short",
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 6,
            "spanNulls": false
          }
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "calcs": [
            "lastNotNull",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi"
        }
      }
    }
  ],
  "links": [],
  "templating": {
    "list": []
  },
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "#2563eb",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  }
}