すべてのプロダクト
Search
ドキュメントセンター

Cloud Monitor:vLLM/SGLang 推論エンジンのオブザーバビリティ

最終更新日:Aug 21, 2026

Application Monitoring の Python エージェントの vLLM/SGLang プラグインを使用して、リクエストをトレースし、主要なメトリックを収集し、推論エンジンのパフォーマンスを監視します。

説明

ARMS は、vLLM/SGLang フレームワークのオブザーバビリティのみをサポートします。

PAI-EAS との統合

Elastic Algorithm Service (EAS) は、オンライン推論のための PAI 製品です。モデルサービスをパブリックまたは専用リソースグループにデプロイすると、CPU や GPU などの異種ハードウェアでオンライン推論を実行できます。

ステップ 1: 環境変数の準備

export ARMS_APP_NAME=xxx   # EAS アプリケーション名。
export ARMS_REGION_ID=xxx   # Alibaba Cloud アカウントのリージョン ID。
export ARMS_LICENSE_KEY=xxx   # Alibaba Cloud のライセンスキー。

ステップ 2: PAI-EAS 実行コマンドの変更

  1. PAI コンソールにログインします。上部メニューで、対象のリージョンを選択し、対象のワークスペースに移動します。

  2. 左側のナビゲーションペインで、[モデルデプロイメント] > [Elastic Algorithm Service (EAS)] を選択します。

  3. [推論サービス] タブで、対象のアプリケーションを見つけ、[操作] 列の [更新] をクリックします。

  4. 実行コマンドを変更します。

    この例では、DeepSeek-R1-Distill-Qwen-7B モデルを使用します。

    元の vLLM コマンド:

    gpu_count=$(nvidia-smi --query-gpu=count --format=csv,noheader | wc -l);vllm serve /model_dir --host 0.0.0.0 --port 8000 --root-path '/' --trust-remote-code --gpu-memory-utilization 0.95 --max-model-len 32768 --tensor-parallel-size $gpu_count --served-model-name DeepSeek-R1-Distill-Qwen-7B

    Application Monitoring と統合するための vLLM コマンド:

    gpu_count=$(nvidia-smi --query-gpu=count --format=csv,noheader | wc -l);pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ ; pip3 config set install.trusted-host mirrors.aliyun.com; pip3 install aliyun-bootstrap;ARMS_REGION_ID=cn-hangzhou aliyun-bootstrap -a install;ARMS_APP_NAME=qwq32 ARMS_LICENSE_KEY=it0kjz0oxz@3115ad****** ARMS_REGION_ID=cn-hangzhou aliyun-instrument vllm serve /model_dir --host 0.0.0.0 --port 8000 --root-path '/' --trust-remote-code --gpu-memory-utilization 0.95 --max-model-len 32768 --tensor-parallel-size $gpu_count --served-model-name DeepSeek-R1-Distill-Qwen-7B

    追加されたコマンドの説明:

    1. PyPI リポジトリを設定します。必要に応じてこの設定を調整してください。

      pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ ; pip3 config set install.trusted-host mirrors.aliyun.com;
    2. エージェントインストーラーをダウンロードします。

      pip3 install aliyun-bootstrap;
    3. インストーラーを使用してエージェントをインストールします。

      cn-hangzhou を実際のリージョンに置き換えてください。

      ARMS_REGION_ID=cn-hangzhou aliyun-bootstrap -a install;

    元の SGLang コマンド:

    python -m sglang.launch_server --model-path /model_dir

    Application Monitoring と統合するための SGLang コマンド:

    pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ ; pip3 config set install.trusted-host mirrors.aliyun.com; pip3 install aliyun-bootstrap;ARMS_REGION_ID=cn-hangzhou aliyun-bootstrap -a install;ARMS_APP_NAME=qwq32 ARMS_LICENSE_KEY=it0kjz0oxz@3115ad****** ARMS_REGION_ID=cn-hangzhou aliyun-instrument python -m sglang.launch_server --model-path /model_dir

    コマンドの説明:

    1. PyPI リポジトリを設定します。必要に応じてこの設定を調整してください。

      pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ ; pip3 config set install.trusted-host mirrors.aliyun.com;
    2. エージェントインストーラーをダウンロードします。

      pip3 install aliyun-bootstrap;
    3. エージェントをインストールします。

      cn-hangzhouを実際のリージョンに置き換えます。

      ARMS_REGION_ID=cn-hangzhou aliyun-bootstrap -a install;
  5. [更新] をクリックします。

一般的なシナリオでのモデル統合

ARMS は、公式の vLLM (V0 および V1) と SGLang バージョンのみをサポートします。変更されたバージョンはサポート対象外です。サポートされているバージョンの詳細については、「大規模言語モデル (LLM) サービス」をご参照ください。

ARMS はコンプリーションとチャットのシナリオをサポートします。非ストリーミングリクエストの場合は2つのスパン、ストリーミングリクエストの場合は3つのスパンを収集します。

サポートされているシナリオ

データ処理

収集される内容

vLLM V0

vLLM V1

SGLang

チャット

または

コンプリーション

ストリーミング

スパン

  • http

  • input/output

  • llm_request: 主要メトリック

  • http

  • input/output

  • http

  • input/output

  • 主要メトリック

  • 推論

主要メトリック

TTFT/TPOP

サポート

非対応

サポート

非ストリーミング

スパン

  • http

  • input/output

  • http

  • input/output

  • http

  • input/output

主要メトリック

TTFT/TPOP

該当なし

該当なし

該当なし

埋め込み

http

非対応

非対応

非対応

リランク

http

非対応

非対応

非対応

重要なスパンと属性

llm_request に関連する項目:

属性

説明

gen_ai.latency.e2e

エンドツーエンド時間

gen_ai.latency.time_in_queue

キュー内時間

gen_ai.latency.time_in_scheduler

スケジューリング時間

gen_ai.latency.time_to_first_token

最初のトークンまでの時間

gen_ai.request.id

リクエスト ID