SPDK建立在SPDK blobstore之上,因为blobstore提供了高性能、低开销的群集分配。此外,在blobstore中,也支持精简配置、快照和写入时复制。在最新的SPDK版本中,它实现了具有以下功能的逻辑卷[3]。
spdk_path='/home/kuhan/yhc/bcstore'
cd ${spdk_path}
./build/bin/nvmf_tgt >nvmf_tgt.log 2>&1 &
traddr='0000:65:00.0'
lvol_size=1048576
./scripts/rpc.py bdev_nvme_attach_controller -b Nvme0 -t PCIe -a ${traddr}
./scripts/rpc.py bdev_lvol_create_lvstore Nvme0n1 LVS0
./scripts/rpc.py bdev_lvol_create -l LVS0 LVOL0 ${lvol_size}
{
"subsystems": [
{
"subsystem": "bdev",
"config": [
{
"method": "bdev_nvme_attach_controller",
"params": {
"trtype": "PCIe",
"name": "NVMe1",
"traddr":"0000:65:00.0"
}
}
]
}
]
}
[global]
ioengine=/home/kuhan/yhc/bcstore/build/fio/spdk_bdev
spdk_json_conf=/home/kuhan/yhc/bcstore/test/stability/lvol/lvol_bdev.json
thread=1
direct=1 # 排除OS的IO缓存机制的影响
#size=4000G # 每个fio进程/线程的最大读写
#lockmem=1G # 锁定所使用的内存大小
runtime=300 # 根据上面的结论以后采用180值
filename=LVS0/LVOL1 # NVMe bdev
numjobs=1 # 同时进行的任务数
iodepth=1 # 队列深度
group_reporting # 多个job合并出报告
[4k_write]
stonewall # 隔离各测试任务
rw=write
bs=4k
[4k_read]
stonewall
rw=read
bs=4k
[4k_randwrite]
stonewall
rw=randwrite
bs=4k
[4k_randread]
stonewall
rw=randread
bs=4k
/home/kuhan/yhc/fio/fio /home/kuhan/yhc/test/spdk_lvol_test.fio