git clone https://github.com/spdk/spdk
cd spdk
git submodule update –-init
git checkout v24.01
git checkout -b v2401
git submodule update --init
git clone https://github.com/axboe/fio
cd fio
make
make install
./scripts/pkgdep.sh --all
./configure --with-fio=/<path to fio>/fio/
make
lspci | grep -i volatile
./scripts/setup.sh
./scripts/setup.sh status
./scripts/gen_nvme.sh --json-with-subsystems > fio_nvme_rpc.json
cat fio_nvme_rpc.json
vim fio_rpc.conf
cat fio_rpc.conf
fio fio_rpc.conf // 终端1中执行
a). 执行SPDK iostat.py来查看Bdev上的IO统计
./scripts/iostat.py -i 1 -t 30 // FIO运行起来后,终端2中执行
b). 执行SPDK NVMe Bdev RPC命令来查看SSD盘上的特定信息
./scripts/rpc.py bdev_get_bdevs
./scripts/rpc.py bdev_nvme_get_controller_health_info -c Nvme0
./scripts/rpc.py bdev_nvme_get_controller_health_info -c Nvme0 | grep temperature_celsius
c). 执行SPDK Cuse操作,通过内核设备来查询
./scripts/rpc.py bdev_nvme_cuse_register -n Nvme0
ll /dev/spdk/
nvme smart-log/dev/spdk/nvme0
在FIO退出前,执行下面命令unregister掉设备。
./scripts/rpc.py bdev_nvme_cuse_unregister -n Nvme0
ll /dev/spdk
本文详细介绍了SPDK FIO Bdev Plugin,结合SPDK不同的RPC命令的使用,目的有助于在标准化FIO结合SPDK的测试中,提供不仅数据面SPDK的加速,同时管控面的便利性。当中有任何问题的话,欢迎后台留言或者加微信进一步联系。
参考链接:
1.https://github.com/spdk/spdk/commit/0ab8393c605d617a186c66cb236109733a6e8f0c
2.https://spdk.io/doc/jsonrpc.html
3.https://spdk.io/doc/bdev.html
4.https://github.com/spdk/spdk/blob/master/app/fio/bdev/fio_plugin.c
5.https://github.com/spdk/spdk/blob/master/app/fio/bdev/README.md
转载须知
推荐阅读
往期阅读