io测试工具fio

这个工具最大的特点是使用简单,支持的文件操作非常多, 可以覆盖到我们能见到的文件使用方式:
syncBasic read(2) or write(2) I/O. fseek(2) is used to position the I/O location.
psyncBasic pread(2) or pwrite(2) I/O.
vsync: Basic readv(2) or writev(2) I/O. Will emulate queuing by coalescing adjacents IOs into a single submission.
libaio: Linux native asynchronous I/O.
posixaio: glibc POSIX asynchronous I/O using aio_read(3) and aio_write(3).
mmap: File is memory mapped with mmap(2) and data copied using memcpy(3).
splice splice(2) is used to transfer the data and vmsplice(2) to transfer data from user-space to the kernel.
syslet-rwUse the syslet system calls to make regular read/write asynchronous.
sgSCSI generic sg v3 I/O.
net Transfer over the network. filename must be set appropriately to `host/port’ regardless of data direction. If receiving,
only the port argument is used.
netspliceLike net, but uses splice(2) and vmsplice(2) to map data and send/receive.
guasi The GUASI I/O engine is the Generic Userspace Asynchronous Syscall Interface approach to asycnronous I/O.

 

如下是一个测试结果的例子:

 

配置文件: 
root@cvknode1:~# cat sync_test6 
; This case to test Basic read(2) or write(2) I/O. fseek(2) is used to position the I/O location. 
; wirte randomly: rw=randwrite 
; big IO: bsrange=4096-16384 
; write with buffer: direct=0 
; have to privide --runtime and --filename parameters when run 

[global] 
ioengine=sync 
rw=randwrite 
rwmixwrite=100 
time_based 
;runtime=60 
group_reporting 
randrepeat=0 
norandommap 
ramp_time=6 
iodepth=8 
iodepth_batch=4 
iodepth_low=4 
iodepth_batch_complete=4 
exitall 

[synctest1] 
bsrange=4096-16384 
direct=0 
;filename=/vms/cas2.0/synctest1 
;numjobs=16 
size=10G 

运行结果: 
root@cvknode1:~# ./fio --runtime 30 --numjobs 16 --filename /vms/cas2.0/synctest1 sync_test6 
synctest1: (g=0): rw=randwrite, bs=4K-16K/4K-16K/4K-16K, ioengine=sync, iodepth=8 
... 
fio-2.15 
Starting 16 processes 
Jobs: 16 (f=16): [w(16)] [92.9% done] [0KB/0KB/0KB /s] [0/0/0 iops] [eta 00m:03s] 
synctest1: (groupid=0, jobs=16): err= 0: pid=18167: Tue Nov 29 16:07:01 2016 
write: io=947172KB, bw=28646KB/s, iops=4103, runt= 33065msec 
clat (usec): min=1, max=6176.2K, avg=3763.14, stdev=131888.04 
lat (usec): min=1, max=6176.2K, avg=3763.24, stdev=131888.04 
clat percentiles (usec): 
| 1.00th=[ 2], 5.00th=[ 3], 10.00th=[ 4], 20.00th=[ 6], 
| 30.00th=[ 8], 40.00th=[ 9], 50.00th=[ 11], 60.00th=[ 13], 
| 70.00th=[ 16], 80.00th=[ 20], 90.00th=[ 27], 95.00th=[ 36], 
| 99.00th=[ 322], 99.50th=[46848], 99.90th=[179200], 99.95th=[5144576], 
| 99.99th=[5734400] 
lat (usec) : 2=0.11%, 4=5.46%, 10=35.50%, 20=38.21%, 50=18.58% 
lat (usec) : 100=1.10%, 250=0.03%, 500=0.01%, 1000=0.01% 
lat (msec) : 2=0.01%, 4=0.01%, 10=0.04%, 20=0.10%, 50=0.39% 
lat (msec) : 100=0.18%, 250=0.21%, 500=0.01%, 2000=0.01%, >=2000=0.06% 
cpu : usr=0.01%, sys=0.38%, ctx=41819, majf=0, minf=70 
IO depths : 1=473.9%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0% 
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% 
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% 
issued : total=r=0/w=135680/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0 
latency : target=0, window=0, percentile=100.00%, depth=8 

Run status group 0 (all jobs): 
WRITE: io=947172KB, aggrb=28645KB/s, minb=28645KB/s, maxb=28645KB/s, mint=33065msec, maxt=33065msec 

Disk stats (read/write): 
sda: ios=0/146282, merge=0/62, ticks=0/5411576, in_queue=5435416, util=95.31%

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值