---
title: 使用前准备
description: "1. 在昇腾NPU环境安装配套版本的CANN Toolkit开发套件包和ops算子包并配置CANN环境变量，具体请参见《CANN 软件安装(https://www.hiascend.com/document/detail/zh/canncommercial/900/softwareinst/instg/instg_0000.html)》。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/devaids/Profiling/mindieprofiling_0027.html
sourcePath: /source/zh/canncommercial/900/devaids/Profiling/mindieprofiling_0027.html
indexId: 64b34e1ec58c60d512db8555a29c6cb987b1d4e4c36b8625b85fd6ea00b8658073
---
# 使用前准备

#### 环境准备

1. 在昇腾NPU环境安装配套版本的CANN Toolkit开发套件包和ops算子包并配置CANN环境变量，具体请参见《CANN 软件安装(https://www.hiascend.com/document/detail/zh/canncommercial/900/softwareinst/instg/instg_0000.html)》。
2. 安装环境依赖，命令如下：

```
pip install opentelemetry-exporter-otlp-proto-grpc==1.33.1
pip install opentelemetry-exporter-otlp-proto-http==1.33.1
```


3. 完成MindIE的安装和配置并确认MindIE Motor可以正常运行，具体请参见《MindIE安装指南》。
4. MindIE Motor服务所在的昇腾NPU环境与OTLP采集器（Jaeger等）需建立稳定网络连接。


#### 约束

msServiceProfiler Trace转发数据最大支持400并发，超过400并发可能出现请求积压，请求积压超过1000000，将出现数据丢失。

相关日志提示（下述日志每小时只上报1次）：

```
# 积压请求数量超过100000出现请求积压告警
2025-11-26 15:45:59,038 - 4059906 - msServiceProfiler - WARNING - Trace data is being stacked: {积压数量}
# 积压请求数量超过1000000出现数据丢失告警
2025-11-26 15:45:59,522 - 4059906 - msServiceProfiler - WARNING - Trace data queue is full, discarding the oldest data.
```
