测试命令:
fio -name=iops -filename=/root/testfio -ioengine=libaio -direct=1 -bs=4k -size=4g -runtime=60 -numjobs=2 -thread -rw=write -group_reporting -time_based
两台同配置服务器,同样的测试命令,IOPS相差近40倍:
A服务器平均IOPS=1000+:
B服务器平均IOPS=40000+;
在A服务器上用blktrace分析,发现A的D2C最大耗时902ms,极为不正常;B的D2C耗时最大为40ms,比较正常:
怀疑A服务器raid卡或磁盘有异常,导致D2C耗时较高。查看A,B服务器raid卡,磁盘信息,发现A服务器raid卡的flash、超级电容均不在位,所以怀疑A服务器因此导致了raid卡的write cache功能是关闭的: