【发布时间】:2015-12-12 03:25:50
【问题描述】:
我试图使用 fio 工具和 ioengine 作为 libaio 来获取性能数字(简单的 4K 随机读取)。 我观察到如果直接 io 被禁用(direct=0),那么 iops 会急剧下降。当提供 direct=1 时,iops 提高了 50 倍!
setup: fio being run from a linux client connected to a PCIe based
appliance over Fibre Channel.
这是从我的 fio 配置文件中截取的:
[global]
filename=/dev/dm-30
size=10G
runtime=300
time_based
group_reporting
[test]
rw=randread
bs=4k
iodepth=16
runtime=300
ioengine=libaio
refill_buffers
ioscheduler=noop
#direct=1
通过此设置,我观察到 iops 大约为 8000,当我在上面显示的配置文件中启用 direct=1 时,我看到 iops 跃升至 250K! (在我使用的设置的情况下这是现实的)
所以,我的问题是,如果我们使用 libaio 引擎,使用缓冲 i/o 有什么问题吗?如果我们使用libaio,我们是否必须坚持直接io?
【问题讨论】: