实战spdk perf
spdk的perf能够充分展现nvme 的高性能,那么怎么让这个利器发挥作用呢?下面分享了100% 验证的完整步骤:
-
下载代码并解决编译依赖
-
确定代测试盘的 bdv:
比如我要测/dev/nvme6n1, 由于perf需要指定这个设备对应的PCIE的BDF地址,那么改怎么确定它呢?
[root@test]# ls -alrt /dev/nvme6n1
brw-rw---- 1 root disk 259, 0 Dec 20 17:26 /dev/nvme6n1
[root@test]# cd/sys/dev/block/259:0/device && pwd
/sys/dev/block/259:0/device
[root@test]# ls -alrt
total 0
-rw-r--r-- 1 root root 4096 Dec 19 23:05 uevent
drwxr-xr-x 3 root root 0 Dec 19 23:05 .
lrwxrwxrwx 1 root root 0 Dec 19 23:05 subsystem -> ../../../../../../class/nvme
drwxr-xr-x 7 root root 0 Dec 19 23:05 nvme6n1
drwxr-xr-x 3 root root 0 Dec 19 23:05 ..
lrwxrwxrwx 1 root root 0 Dec 20 21:31 device -> ../../../0000:b1:00.0 -
加载DPDK huge page
cd /root/spdk-bundle/dpdk/dpdk-16.11/tools
./dpdk_setup.sh
会看到下面的输出:Step 2: Setup linuxapp environment
[16] Insert IGB UIO module
[17] Insert VFIO module
[18] Insert KNI module
[19] Setup hugepage mappings for non-NUMA systems
[20] Setup hugepage mappings for NUMA systems
[21] Display current Ethernet/Crypto device settings
[22] Bind Ethernet/Crypto device to IGB UIO module
[23] Bind Ethernet/Crypto device to VFIO module
[24] Setup VFIO permissions
Step 3: Run test application for linuxapp environment
[25] Run test application ($RTE_TARGET/app/test)
[26] Run testpmd application in interactive mode ($RTE_TARGET/app/testpmd)
Step4: Other tools
[27] List hugepage info from /proc/meminfo
Step 5: Uninstall and system cleanup
[28] Unbind devices from IGB UIO or VFIO driver
[29] Remove IGB UIO module
[30] Remove VFIO module
[31] Remove KNI module
[32] Remove hugepage mappings
[33] Exit Script
Option: 20
1116
创建huge page然后退出。
-
卸载测试盘默认linux 的nvme 驱动
cd /root/spdk-bundle/spdk/spdkv1707/scripts
为了避免卸掉其他可能正在使用的nvme盘的驱动,参考下面改动直接指定:
function linux_iter_pci {Argument is the class code
# TODO: More specifically match against only class codes in the grep #step. #lspci -mm -n -D | grep $1 | tr -d '"' | awk -F " " '{print $1}' echo "0000:b1:00.0"
}
然后:
./setup.sh - 运行测试:
./perf -q 256 -s 512000 -w randwrite -t 36000 -c 0xc -r 'trtype:PCIe traddr:b1:00.0' 2>&1 | tee -a nvme_spdk_nvme6.log &
- CentOS7下编译安装SPDK iSCSI Target
- spdk 编译动态库( spdk compiles shared library )
- 专家SP2010实战--第一章节--工作流
- 存储过程第三讲:sp实战
- SPDK meetup event
- SPDK SRIOV VIRTIO
- 文章汇总(包括NVMe SPDK vSAN Ceph xfs等)
- SPDK+NVMe SSD对接Virtio支撑红包场景性能
- SPDK简介及基本使用
- 【送书活动】机器学习项目开发实战
- 《Spark商业案例与性能调优实战100课》第9课:商业案例之通过Spark SQL 下两种不同方式实现口碑最佳和最热门电影比较
- Go实战--golang新手入门常见错误(The way to go)
- 【struts2+hibernate+spring项目实战】用户登录校验(struts拦截器)
- 2018最新Maven3实战14集完整版
- PeToUSB-——实战卡巴斯基杀毒U盘启动盘
- Win2008 R2实战之独立DNS迁移攻略
- ASP.NET MVC架构与实战系列
- HTML5实战与剖析之原生拖拽(四可拖动dragable属性和其他成员)
- Spark API编程动手实战-07-join操作深入实战
- Android实战技巧:为从右向左语言定义复杂字串,代码和xml设置