日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

MySQL Hardware--FIO压测

發(fā)布時(shí)間:2023/12/13 68 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MySQL Hardware--FIO压测 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

FIO參數(shù)

filename=/export/1.txt 支持文件系統(tǒng)或者裸設(shè)備,-filename=/dev/sda2或-filename=/dev/sdb direct=1 測試過程繞過機(jī)器自帶的buffer,使測試結(jié)果更真實(shí) rw=randwread 測試隨機(jī)讀的I/O rw=randwrite 測試隨機(jī)寫的I/O rw=randrw 測試隨機(jī)混合寫和讀的I/O rw=read 測試順序讀的I/O rw=write 測試順序?qū)懙腎/O rw=rw 測試順序混合寫和讀的I/O bs=4k 單次io的塊文件大小為4k bsrange=512-2048 同上,提定數(shù)據(jù)塊的大小范圍 size=5g 本次的測試文件大小為5g,以每次4k的io進(jìn)行測試 numjobs=30 本次的測試線程為30 runtime=1000 測試時(shí)間為1000秒,如果不寫則一直將5g文件分4k每次寫完為止 ioengine=psync io引擎使用pync方式,如果要使用libaio引擎,需要yum install libaio-devel包 rwmixwrite=30 在混合讀寫的模式下,寫占30% group_reporting 關(guān)于顯示結(jié)果的,匯總每個(gè)進(jìn)程的信息 lockmem=1g 只使用1g內(nèi)存進(jìn)行測試 zero_buffers 用0初始化系統(tǒng)buffer nrfiles=8 每個(gè)進(jìn)程生成文件的數(shù)量

?

ioengine參數(shù)

sync:Basic read(2) or write(2) I/O. fseek(2) is used to position the I/O location.psync:Basic 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-rw: Use the syslet system calls to make regular read/write asynchronous.sg:SCSI 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.netsplice: Like 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.

?

測試結(jié)果解讀

4k隨機(jī)讀寫,70%讀+30%寫,30個(gè)并發(fā)

fio -filename=/export/1.txt -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=4k -size=10G -numjobs=30 -runtime=60 -group_reporting -name=randrw_70read_4k

輸出結(jié)果:

Jobs: 30 (f=30): [mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm] [100.0% done] [99648K/42236K/0K /s] [24.1K/10.6K/0 iops] [eta 00m:00s] randrw_70read_4k: (groupid=0, jobs=30): err= 0: pid=4183: Sun May 5 14:56:16 2019read : io=5873.2MB, bw=100232KB/s, iops=25057 , runt= 60002msecclat (usec): min=129 , max=17247 , avg=872.95, stdev=884.86lat (usec): min=129 , max=17247 , avg=873.04, stdev=884.86clat percentiles (usec):| 1.00th=[ 141], 5.00th=[ 149], 10.00th=[ 157], 20.00th=[ 175],| 30.00th=[ 193], 40.00th=[ 788], 50.00th=[ 988], 60.00th=[ 1096],| 70.00th=[ 1192], 80.00th=[ 1304], 90.00th=[ 1448], 95.00th=[ 1576],| 99.00th=[ 2640], 99.50th=[ 8512], 99.90th=[ 9152], 99.95th=[ 9280],| 99.99th=[10048]bw (KB/s) : min= 2680, max= 3992, per=3.34%, avg=3342.81, stdev=180.17write: io=2519.1MB, bw=43005KB/s, iops=10751 , runt= 60002msecclat (usec): min=45 , max=21382 , avg=750.66, stdev=874.94lat (usec): min=45 , max=21382 , avg=750.85, stdev=874.94clat percentiles (usec):| 1.00th=[ 52], 5.00th=[ 57], 10.00th=[ 60], 20.00th=[ 68],| 30.00th=[ 79], 40.00th=[ 644], 50.00th=[ 868], 60.00th=[ 988],| 70.00th=[ 1080], 80.00th=[ 1192], 90.00th=[ 1320], 95.00th=[ 1448],| 99.00th=[ 1816], 99.50th=[ 8384], 99.90th=[ 9024], 99.95th=[ 9280],| 99.99th=[ 9920]bw (KB/s) : min= 1016, max= 2064, per=3.34%, avg=1434.25, stdev=131.77lat (usec) : 50=0.06%, 100=11.02%, 250=26.21%, 500=0.67%, 750=2.40%lat (usec) : 1000=13.91%lat (msec) : 2=44.51%, 4=0.41%, 10=0.79%, 20=0.01%, 50=0.01%cpu : usr=0.19%, sys=2.19%, ctx=4148485, majf=0, minf=18446744073708663675IO depths : 1=100.0%, 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=1503524/w=645100/d=0, short=r=0/w=0/d=0Run status group 0 (all jobs):READ: io=5873.2MB, aggrb=100231KB/s, minb=100231KB/s, maxb=100231KB/s, mint=60002msec, maxt=60002msecWRITE: io=2519.1MB, aggrb=43005KB/s, minb=43005KB/s, maxb=43005KB/s, mint=60002msec, maxt=60002msecDisk stats (read/write):sda: ios=1499788/643481, merge=0/1, ticks=271811/40234, in_queue=311058, util=98.88%

縮寫解釋:

io=執(zhí)行了多少M(fèi)的IObw=平均IO帶寬 iops=IOPS runt=線程運(yùn)行時(shí)間 slat=提交延遲 clat=完成延遲 lat=響應(yīng)時(shí)間 bw=帶寬 cpu=利用率 IO depths=io隊(duì)列 IO submit=單個(gè)IO提交要提交的IO數(shù) IO complete=Like the above submit number, but for completions instead. IO issued=The number of read/write requests issued, and how many of them were short. IO latencies=IO完延遲的分布io=總共執(zhí)行了多少size的IO aggrb=group總帶寬 minb=最小.平均帶寬. maxb=最大平均帶寬. mint=group中線程的最短運(yùn)行時(shí)間. maxt=group中線程的最長運(yùn)行時(shí)間.ios=所有g(shù)roup總共執(zhí)行的IO數(shù). merge=總共發(fā)生的IO合并數(shù). ticks=Number of ticks we kept the disk busy. io_queue=花費(fèi)在隊(duì)列上的總共時(shí)間. util=磁盤利用率

?

在8塊800GB的SSD做RAID 10的存儲(chǔ)上使用psync引擎進(jìn)行測試,測試結(jié)果:

4k+70%隨機(jī)讀+30%隨機(jī)寫: 24.1K+10.6K 4k+100%隨機(jī)讀: 127K 4k+100%隨機(jī)寫: 16.2K1k+70%隨機(jī)讀+30%隨機(jī)寫: 23.4K+10.4K 1k+100%隨機(jī)讀: 131K 1k+100%隨機(jī)寫: 13.8K

上面跑的時(shí)間較短,測試誤差較大!

?

抄自:

https://www.cnblogs.com/raykuan/p/6914748.html

http://blog.yufeng.info/archives/1497

http://blog.yufeng.info/archives/677

轉(zhuǎn)載于:https://www.cnblogs.com/gaogao67/p/10813157.html

總結(jié)

以上是生活随笔為你收集整理的MySQL Hardware--FIO压测的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。