当前位置: 首页 > news >正文

【spdk】spdk compressdev测试

spdk-23.09\go\rpc\README.md go client

启应用

启哪个应用?
./build/bin/iscsi_tgt --wait-for-rpc &

/usr/local/daos-2.4/prereq/release/spdk/share/spdk/scripts/rpc.py bdev_malloc_create -b Malloc0 1024 4096 #1G bs=4k

/usr/local/daos-2.4/prereq/release/spdk/share/spdk/scripts/rpc.py bdev_get_bdevs #查看bdevs

/usr/local/daos-2.4/prereq/release/spdk/share/spdk/scripts/rpc.py bdev_lvol_create_lvstore Malloc0 lvs
/usr/local/daos-2.4/prereq/release/spdk/share/spdk/scripts/rpc.py bdev_lvol_create -t -l lvs lv0 1024

mount /dev/pmem0 /tmp/pmem
/usr/local/daos-2.4/prereq/release/spdk/share/spdk/scripts/rpc.py bdev_compress_create -b lvs/lv0 -p /tmp/pmem

[root@localhost spdk]# ./scripts/rpc.py bdev_compress_create -b lvs/lv0 -p /tmp/pmem
request:
{
“base_bdev_name”: “lvs/lv0”,
“pm_path”: “/tmp/pmem”,
“method”: “bdev_compress_create”,
“req_id”: 1
}
Got JSON-RPC error response
response:
{
“code”: -32601,
“message”: “Method not found”
}

需解决以上问题

解决方法, 编译SPDK时需要加上相关的库

–with-crypto
–with-vbdev-compress --with-dpdk-compressdev

./configure --prefix=output_dir --with-dpdk --disable-unit-tests --with-vhost --with-crypto --without-rbd --without-vtune --without-shared --with-rdma --with-vbdev-compress --with-dpdk-compressdev

配置QAT PMD

如下 按步骤执行

1.启动应用 加–wait-for-rpc
2…/spdk/scripts/rpc.py framework_start_init #启动加速框架
3…/spdk/scripts/rpc.py accel_get_module_info #获取加速模块
[root@localhost test]# …/spdk/scripts/rpc.py framework_start_init
[root@localhost test]# …/spdk/scripts/rpc.py accel_get_module_info
[
{
“module”: “software”,
“supported ops”: [
“copy”,
“fill”,
“dualcast”,
“compare”,
“crc32c”,
“copy_crc32c”,
“compress”,
“decompress”,
“encrypt”,
“decrypt”,
“xor”
]
},
{
“module”: “dpdk_cryptodev”,
“supported ops”: [
“copy”,
“fill”
]
},
{
“module”: “dpdk_compressdev”,
“supported ops”: []
}
]

[root@localhost test]# …/spdk/scripts/rpc.py compressdev_scan_accel_module -h
usage: rpc.py [options] compressdev_scan_accel_module [-h] [-p PMD]

optional arguments:
-h, --help show this help message and exit
-p PMD, --pmd PMD 0 = auto-select, 1= QAT only, 2 = mlx5_pci only

[root@localhost test]# …/spdk/scripts/rpc.py compressdev_scan_accel_module -p 0
[root@localhost test]# …/spdk/scripts/rpc.py compressdev_scan_accel_module -p 1
[root@localhost test]# …/spdk/scripts/rpc.py compressdev_scan_accel_module -p 2
分别对应:(怎么都是dpdk_compressdev)
[2024-01-17 08:05:16.008732] accel.c:2312:spdk_accel_module_list_add: NOTICE: Module dpdk_compressdev already registered
[2024-01-17 08:06:37.788732] accel.c:2312:spdk_accel_module_list_add: NOTICE: Module dpdk_compressdev already registered
[2024-01-17 08:06:46.996707] accel.c:2312:spdk_accel_module_list_add: NOTICE: Module dpdk_compressdev already registered

[root@localhost spdk]# ./scripts/rpc.py --verbose DEBUG compressdev_scan_accel_module -p 0
INFO: Log level set to 10
DEBUG: Trying to connect to UNIX socket: /var/tmp/spdk.sock
DEBUG: call(‘compressdev_scan_accel_module’)
DEBUG: append request:
{“jsonrpc”: “2.0”, “method”: “compressdev_scan_accel_module”, “id”: 1, “params”: {“pmd”: 0}}

DEBUG: Flushing buffer
INFO: Requests:
{
“jsonrpc”: “2.0”,
“method”: “compressdev_scan_accel_module”,
“id”: 1,
“params”: {
“pmd”: 0
}
}

DEBUG: Trying to decode response ‘’
DEBUG: Partial response
DEBUG: Trying to decode response '{“jsonrpc”:“2.0”,“id”:1,“result”:true}

INFO: response:
{
“jsonrpc”: “2.0”,
“id”: 1,
“result”: true
}

Installing Intel QAT (IDZ 方式)

  • 下载安装driver https://github.com/intel/qatlib
./configure; make install
# Sample programs can be installed by using the “make samples-install”. The sample program “cpa_sample_code runTests=32” can be used to test compression performance.
  • 检查安装状态

    lsmod | grep qat
    qat_4xxx               20480  0
    intel_qat             270336  1 qat_4xxx
    crc8                   16384  1 intel_qat
    authenc                16384  1 intel_qat
  • 检查 service 状态

    # service qat_service start||stop||status||restart||shutdown
    # For a system with multiple Intel® QAT Endpoints, you can start, stop or restart each individual device by passing the Intel® QAT Endpoint to be restarted or stopped as a parameter qat_dev<N>, for example:
    service qat_service stop qat_dev0
    service qat_service stop qat_dev1
    # The shutdown qualifier enables the user to bring down all Intel® QAT Endpoints and unload driver modules from the kernel. This contrasts with the stop qualifier, which brings down one or more Intel® QAT Endpoints, but does not unload kernel modules, so other Intel® QAT Endpoints can still run.
    # service qat_service statusChecking status of all devices.There is 3 QAT acceleration device(s) in the system:qat_dev0 - type: c6xx, inst_id: 0, node_id: 1, bsf: 0000:cc:00.0, #accel: 5 #engines: 10 state: upqat_dev1 - type: c6xx, inst_id: 1, node_id: 1, bsf: 0000:ce:00.0, #accel: 5 #engines: 10 state: upqat_dev2 - type: c6xx, inst_id: 2, node_id: 1, bsf: 0000:d0:00.0, #accel: 5 #engines: 10 state: up
http://www.lryc.cn/news/287411.html

相关文章:

  • Linux中并发程序设计(进程的创建和回收、exec函数使用)
  • 2023年DevOps国际峰会暨 BizDevOps 企业峰会(DOIS北京站):核心内容与学习收获(附大会核心PPT下载)
  • pdf 转html 在线预览和查询
  • docker 体验怀旧游戏(魂斗罗等)
  • JS中判断数据类型总结以及方法封装
  • 【Midjourney】绘画风格关键词
  • 教你如何低成本自建「幻兽帕鲁」服务器,快速一键部署
  • 拥抱社交电商浪潮:微信小程序商城崛起引领电商新风向-亿发
  • 一个使用pyqt的word文档查重工具
  • SpringCloud Alibaba Sentinel 与 SpringCloud Gateway 的限流有什么差别?(三种限流算法原理分析)
  • 邦芒忠告:职场新人最需要避开的十大雷坑
  • MySQL-进阶-索引
  • GitLab入门指南:上传与下载操作一网打尽
  • GPT应用_PrivateGPT
  • Qt‘s 撤销框架(Qt‘s Undo Framework)
  • 【C++】stack、queue的使用及模拟实现
  • 外包干了2个多月,技术退步明显。。。。。
  • html5实现好看的年会邀请函源码模板
  • 【C++】反向迭代器模拟实现
  • 【低照度图像增强系列(5)】Zero-DCE算法详解与代码实现(CVPR 2020)
  • 三维重建衡量指标记录
  • 在WinForms中控制模态对话框的关闭行为
  • java web mvc-02-struts2
  • 文件上传之大文件分块上传
  • 测试用例评审流程
  • 鸿蒙开发案列一
  • Vue实现图片预览,侧边栏懒加载,不用任何插件,简单好用
  • Spring依赖注入之setter注入与构造器注入以及applicationContext.xml配置文件特殊值处理
  • 碳排放预测 | Matlab实现LSTM多输入单输出未来碳排放预测,预测新数据
  • 手拉手JavaFX UI控件与springboot3+FX桌面开发