use bonnie to test system io speed
friday, 2004-09-17 11:33 eygle
原文链接:
http://www.eygle.com/unix/use.bonnie.to.test.io.speed.htm
bonnie是一款极小的测试系统io性能的工具,源代码公开.作者主页:
http://www.textuality.com/bonnie/
你也可以点击这里下载
编译bonnie极其简单,但是需要你安装了make及gcc (或cc)
# makeoptions are “make bsd” and “make sysv” – the default is “bsd”.if you get messages about missing functions, try “make sysv.”make bonnie make[1]: entering directory `/export/home/gqgai/bonniecc -o bonnie.c -o bonniemake[1]: leaving directory `/export/home/gqgai/bonnie
其使用手册在:
http://www.textuality.com/bonnie/advice.html
测试io速度:
1.t3阵列速度测试(raid5)
# df -kfilesystem kbytes used avail capacity mounted on/dev/dsk/c0t0d0s0 1018382 117711 839569 13% //dev/dsk/c0t0d0s6 2055705 1177602 816432 60% /usr/proc 0 0 0 0% /procfd 0 0 0 0% /dev/fdmnttab 0 0 0 0% /etc/mnttab/dev/dsk/c0t0d0s1 1448911 772148 618807 56% /varswap 4770120 8 4770112 1% /var/runswap 4958928 188816 4770112 4% /tmp/dev/dsk/c5t1d0s0 51634648 35154404 15963898 69% /data1/dev/dsk/c5t1d1s1 25816144 21498881 4059102 85% /data3/dev/dsk/c5t1d1s0 25816144 14650723 10907260 58% /data2/dev/dsk/c0t2d0s1 15483618 1074317 14254465 8% /temp/dev/dsk/c0t2d0s0 7136886 2824586 4240932 40% /varlink/dev/dsk/c0t2d0s5 8258597 5868224 2307788 72% /opt/dev/dsk/c0t2d0s7 2053605 1281342 710655 65% /export/home/dev/dsk/c0t2d0s6 2053605 178151 1813846 9% /usr/local# formatsearching for disks…doneavailable disk selections: 0. c0t0d0 /pci@1f,4000/scsi@3/sd@0,0 1. c0t1d0 /pci@1f,4000/scsi@3/sd@1,0 2. c0t2d0 /pci@1f,4000/scsi@3/sd@2,0 3. c3t0d0 /pci@4,4000/scsi@4/sd@0,0 4. c3t1d0 /pci@4,4000/scsi@4/sd@1,0 5. c3t2d0 /pci@4,4000/scsi@4/sd@2,0 6. c3t3d0 /pci@4,4000/scsi@4/sd@3,0 7. c5t1d0 /pci@1f,2000/sunw,qlc@1/fp@0,0/ssd@w50020f23000083a2,0 8. c5t1d1 /pci@1f,2000/sunw,qlc@1/fp@0,0/ssd@w50020f23000083a2,1specify disk (enter its number): ^d# ./bonnie -d /data1 -s 2046 -m billing-center file /data1/bonnie.8273, size: 2145386496writing with putc()…donerewriting…donewriting intelligently…donereading with getc()…donereading intelligently…adoneseeker 2…seeker 1…seeker 3…start em…done…done…done… ——-sequential output——– —sequential input– –random– -per char- –block— -rewrite– -per char- –block— –seeks—machine mb k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu /sec %cpubilling- 2046 10251 87.5 32430 55.7 14048 39.5 12625 99.5 48763 67.3 61.5 8.3
简要介绍一下输出:
这里sequential output指写入速度,char指按字符方式写入,block指按块方式写入,rewrite指顺序改写速度(也就是数据修改)
sequential input指读取速度
cpu,指该操作占用的cpu资源.
此处t3 raid5的写入达到 10251 k/sec
2.本地磁盘速度
# ./bonnie -d /opt/oracle -s 1024 -m billing-centerfile /opt/oracle/bonnie.8545, size: 1073741824writing with putc()…donerewriting…donewriting intelligently…donereading with getc()…donereading intelligently…doneseeker seeker 2…1…seeker 3…start em…done…done…done… ——-sequential output——– —sequential input– –random– -per char- –block— -rewrite– -per char- –block— –seeks—machine mb k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu /sec %cpubilling- 1024 9582 85.0 15928 29.8 6900 20.3 11735 96.5 46098 67.2 256.6 8.8
后面会逐渐添加一些其他硬件的测试数据.
3. emc clariion cx500 测试数据
系统环境:
# /usr/platform/sun4u/sbin/prtdiag -vsystem configuration: sun microsystems sun4u sun fire 480rsystem clock frequency: 150 mhzmemory size: 4096 megabytes========================= cpus =============================================== run e$ cpu cpu brd cpu mhz mb impl. mask — — — —- ——- —- a 0 1050 8.0 us-iii+ 11.0 a 2 1050 8.0 us-iii+ 11.0========================= memory configuration =============================== logical logical logical mc bank bank bank dimm interleave interleavedbrd id num size status size factor with— — —- —— ———– —— ———- ———– a 0 0 512mb no_status 256mb 8-way 0 a 0 1 512mb no_status 256mb 8-way 0 a 0 2 512mb no_status 256mb 8-way 0 a 0 3 512mb no_status 256mb 8-way 0 a 2 0 512mb no_status 256mb 8-way 0 a 2 1 512mb no_status 256mb 8-way 0 a 2 2 512mb no_status 256mb 8-way 0 a 2 3 512mb no_status 256mb 8-way 0========================= io cards ========================= bus max io port bus freq bus dev,type id side slot mhz freq func state name model—- —- —- —- —- —- —- —– ——————————– ———————-pci 8 b 2 33 33 2,0 ok sunw,xvr-100 sunw,375-3126 pci 8 b 4 33 33 4,0 ok fibre-channel-pci10df,f900.10df.+ pci 8 b 5 33 33 5,0 ok fibre-channel-pci10df,f900.10df.+ pci 8 a 0 66 66 1,0 ok pci-pci8086,b154.0/pci108e,1000 pci-bridge pci 8 a 0 66 66 0,0 ok pci108e,1000-pci108e,1000.1 device on pci-bridge pci 8 a 0 66 66 0,1 ok sunw,qfe-pci108e,1001 sunw,pci-qfe/pci-bridg+pci 8 a 0 66 66 1,0 ok pci108e,1000-pci108e,1000.1 device on pci-bridge pci 8 a 0 66 66 1,1 ok sunw,qfe-pci108e,1001 sunw,pci-qfe/pci-bridg+pci 8 a 0 66 66 2,0 ok pci108e,1000-pci108e,1000.1 device on pci-bridge pci 8 a 0 66 66 2,1 ok sunw,qfe-pci108e,1001 sunw,pci-qfe/pci-bridg+pci 8 a 0 66 66 3,0 ok pci108e,1000-pci108e,1000.1 device on pci-bridge pci 8 a 0 66 66 3,1 ok sunw,qfe-pci108e,1001 sunw,pci-qfe/pci-bridg+========================= environmental status =========================system temperatures (celsius):——————————-device temperature status—————————————cpu0 50 okcpu2 52 okdbp0 28 ok=================================front status panel:——————-keyswitch position: normalsystem led status: locator fault power ——- ——- ——- [off] [off] [ on]=================================disk status:————disk 0: [no_fault]disk 1: [no_fault]=================================fan status:———–bank rpm status—- —– ——cpu0 5660 [no_fault]cpu1 3896 [no_fault]cpu2 3797 [no_fault]io0 3947 [no_fault]io1 4166 [no_fault]=================================power supplies:—————supply status—— ——ps0 [no_fault]ps1 [no_fault]========================================================== hw revisions =======================================system prom revisions:———————-obp 4.10.8 2003/07/25 08:44io asic revisions:—————— portmodel id status version——– —- —— ——-schizo 8 ok 7 schizo 9 ok 7
阵列为clariion cx500,以下分别是4块盘的raid1+0及raid5的测试数据:
raid1+0测试
# ./bonnie -d /eygle -s 2046 -m jumpfile /eygle/bonnie.460, size: 2145386496writing with putc()…donerewriting…donewriting intelligently…donereading with getc()…donereading intelligently…doneseeker seeker 2…1…seeker 3…start em…done…done…done… ——-sequential output——– —sequential input– –random– -per char- –block— -rewrite– -per char- –block— –seeks—machine mb k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu /sec %cpujump 2046 37438 88.8 111172 63.8 75940 90.0 43495 99.7 322153 99.9 17747.8 177.5
这里emc cx500的速度达到了,37438k/sec,比t3的性能强了很多
下面是raid5的测试数据:
# ./bonnie -d /eygle -s 2046 -m jumpfile /eygle/bonnie.473, size: 2145386496writing with putc()…donerewriting…donewriting intelligently…donereading with getc()…donereading intelligently…doneseeker seeker 2…1…seeker 3…start em…done…done…done… ——-sequential output——– —sequential input– –random– -per char- –block— -rewrite– -per char- –block— –seeks—machine mb k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu k/sec %cpu /sec %cpujump 2046 40652 95.5 106768 56.1 75673 90.9 43356 99.4 314381 99.8 17347.3 160.5
raid5这里的字符写速度达到了40652k/sec,较raid1+0稍快,而block方式写raid1+0较raid5稍快.
实际上emc一直强调其raid5读写性能较raid1+0相差无几.