fio is an I/O tool meant to be used both for benchmark and stress/hardware verification. It has support for 19 different types of I/O engines (sync, mmap, libaio, posixaio, SG v3, splice, null, network, syslet, guasi, solarisaio, and more), I/O priorities (for newer Linux kernels), rate I/O, forked or threaded jobs, and much more. It can work on block devices as well as files. fio accepts job descriptions in a simple-to-understand text format. Several example job files are included. fio displays all sorts of I/O performance information, including complete IO latencies and percentiles. Fio is in wide use in many places, for both benchmarking, QA, and verification purposes. It supports Linux, FreeBSD, NetBSD, OpenBSD, OS X, OpenSolaris, AIX, HP-UX, Android, and Windows.
2. Usage
name=str ASCII name of the job. filename=str Fio normally makes up a filename based on the job name, thread number, and file number. rw=str Type of io pattern. Accepted values are: read Sequential reads write Sequential writes randwrite Random writes randread Random reads rw,readwrite Sequential mixed reads and writes randrw Random mixed reads and writes rwmixread=int How large a percentage of the mix should be reads. size=int The total size of file io for this job. bs=int The block size used for the io units. ioengine=str Defines how the job issues io to the file. The following types are defined: sync Basic read(2) or write(2) io. lseek(2) is used to position the io location. psync Basic pread(2) or pwrite(2) io. vsync Basic readv(2) or writev(2) IO. psyncv Basic preadv(2) or pwritev(2) IO. iodepth=int This defines how many io units to keep in flight against the file. direct=bool If value is true, use non-buffered io. numjobs=int Create the specified number of clones of this job. group_reporting It may sometimes be interesting to display statistics for groups of jobs as a whole instead of for each individual job. thread fio defaults to forking jobs, however if this option is given, fio will use pthread_create(3) to create threads instead.3. Performance Test
Sequential read
$ fio -name=test -rw=read -size=1G -bs=16k -ioengine=libaio -iodepth=16 -direct=1 -numjobs=16 -group_reportingSequential write
$ fio -name=test -rw=write -size=1G -bs=16k -ioengine=libaio -iodepth=16 -direct=1 -numjobs=16 -group_reportingRandom read
$ fio -name=test -rw=randread -size=1G -bs=16k -ioengine=libaio -iodepth=16 -direct=1 -numjobs=16 -group_reportingRandom write
$ fio -name=test -rw=randwrite -size=1G -bs=16k -ioengine=libaio -iodepth=16 -direct=1 -numjobs=16 -group_reportingSequential mixed read and write
$ fio -name=test -rw=rw -rwmixread=50 -size=1G -bs=16k -ioengine=libaio -iodepth=16 -direct=1 -numjobs=16 -group_reportingRandom mixed read & write
$ fio -name=test -rw=randrw -rwmixread=50 -size=1G -bs=16k -ioengine=libaio -iodepth=16 -direct=1 -numjobs=16 -group_reporting4. 參考來源
http://linux.die.net/man/1/fio
沒有留言:
張貼留言