使用 QAT 加速器

最近更新时间:2024-07-09 10:31:51

我的收藏
英特尔®QAT(Intel®QuickAssist Technology) 是集成在英特尔®至强®可扩展处理器的硬件加速技术,用于从 CPU 中卸载安全、认证和压缩服务,从而显著提高标准平台解决方案的性能和效率,适用于存储数据压缩/解压缩,HPC,网络加解密,分析等场景。更多信息,请参见 intel 官方文档

使用限制

实例限制

腾讯云第八代 Intel Emerald Rapids 云服务器(标准型 S8 、内存型 M8)8核及8核以上的实例可支持开启 QAT 加速器,详细信息请参见 实例规格

镜像限制

建议使用腾讯云 TencentOS 专用镜像 TencentOS Server 3.1 (TK4) For QAT,内部已部署适用于 CPU 平台所携带的加速器。其他系统需自行编译 QAT 驱动或者从系统生态中查找对应的文档。
说明:
QAT 加速器为免费服务,关闭开启不涉及费用变化。
购买页选择开通加速器后,仍需要在实例内部正确启动加速器才可使用。

操作步骤

1. 创建实例时开启 QAT 加速器。
若选择支持 QAT 加速器的实例规格后,可在高级设置中开启 QAT 加速器,如图所示:

2. 在实例内部查询 QAT 加速器状态。
[root@VM-0-16-tencentos ~]# lspci
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
00:01.0 VGA compatible controller: Cirrus Logic GD 5446
00:02.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI Express Root Port 0 (rev 02)
00:03.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI Express Root Port 0 (rev 02)
00:04.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI Express Root Port 0 (rev 02)
00:05.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI Express Root Port 0 (rev 02)
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
01:00.0 PCI bridge: Red Hat, Inc. Device 000e
02:01.0 Ethernet controller: Red Hat, Inc. Virtio network device
02:02.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
02:03.0 SCSI storage controller: Red Hat, Inc. Virtio block device
02:04.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon
03:00.0 PCI bridge: Red Hat, Inc. Device 000e
05:00.0 Co-processor: Intel Corporation Device 0da5 (rev 02)
06:00.0 Co-processor: Intel Corporation Device 0da5 (rev 02)
0da5说明实例内部存在 QAT 加速器。
3. QAT 相关驱动安装。
yum install intel-qat20 kmod-intel-qat20 -y
4. 查看 QAT 加速器状态。
[root@VM-0-16-tencentos ~]# systemctl restart qat
[root@VM-0-16-tencentos ~]# systemctl status qat
当显示为Started QAT service,说明 QAT 设备状态正常。
可用/usr/bin/cpa_sample_code 用例程序检验 QAT 是否正常运作。