1.工具说明:
Oracle自带的一个测试I/O的工具,可以随机读写,摸你混合负载等。
无需安装Orion,配置好LD_LIBRARY_PATH环境变量即可。
如:LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
2.使用方法
#直接输入orion,也是在$ORACLE_HOME/bin下面
[oracle@rac1 ~]$ orion ORION: ORacle IO Numbers -- Version 12.1.0.2.0 Error in input parameters. For help, run: orion -help.
具体例子:
[oracle@rac1 ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 90G 50G 36G 59% / tmpfs 1.9G 964M 905M 52% /dev/shm /dev/sda1 969M 40M 879M 5% /boot
在使用Orion时,需要定义个文件,里面是写需要测试设备的名字。文件已.lun结尾。如iotest.lun
需要root用户去执行命令。所以要把oracle用户下的环境变量添加到root用户下/etc/profile。
#创建配置文件
[root@rac1 ~]# cd /u01 [root@rac1 u01]# ll total 3804184 -rw-r--r-- 1 root root 3895459840 Aug 9 19:57 CentOS-6.7-x86_64-bin-DVD1.iso drwxrwxr-x 3 grid oinstall 4096 Aug 9 19:43 grid drwxrwxr-x 2 grid oinstall 4096 Aug 10 01:52 gridbase drwxrwxr-x 11 oracle oinstall 4096 Sep 8 19:06 oracle drwxrwx--- 5 oracle oinstall 4096 Aug 17 01:08 oraInventory drwxr-xr-x 4 root root 4096 Aug 17 22:31 software [root@rac1 u01]# touch iotest.lun [root@rac1 u01]# vi iotest.lun [root@rac1 u01]# cat iotest.lun /dev/sda3
#开始
[root@rac1 u01]# orion -run oltp -testname iotest ORION: ORacle IO Numbers -- Version 12.1.0.2.0 iotest_20161012_0115 Calibration will take approximately 22 minutes. Using a large value for -cache_size may take longer. ORA-56727: orion must be invoked using its full, absolute path orion_main: orion_spawn sml failed Test aborted due to errors.
提示需要写绝对路径
[root@rac1 u01]# /u01/oracle/product/12.1.0/dbhome_1/bin/orion -run oltp -testname iotest --更多的测试功能,,-help查看 ORION: ORacle IO Numbers -- Version 12.1.0.2.0 iotest_20161012_0116 Calibration will take approximately 22 minutes. --这里会有大概的执行时间 Using a large value for -cache_size may take longer. Maximum Small IOPS=158 @ Small=13 and Large=0 Small Read Latency: avg=82156 us, min=352 us, max=627657 us, std dev=39487 us @ Small=13 and Large=0 Minimum Small Latency=6792 usecs @ Small=1 and Large=0 Small Read Latency: avg=6792 us, min=50 us, max=570843 us, std dev=9543 us @ Small=1 and Large=0 Small Read / Write Latency Histogram @ Small=1 and Large=0 Latency:# of IOs (read) # of IOs (write) 0 - 1us:00 2 - 4us:00 4 - 8us:00 8 - 16us:00 16 - 32us:00 32 - 64us:25020 64 - 128us:11940 128 - 256us:450 256 - 512us:250 512 - 1024us:170 1024 - 2048us:50 2048 - 4096us:1350 4096 - 8192us:8940 8192 - 16384us:34390 16384 - 32768us:5550 32768 - 65536us:110 65536 - 131072us:30 131072 - 262144us:20 262144 - 524288us:00 524288 - 1048576us:10 1048576 - 2097152us:00 2097152 - 4194304us:00 4194304 - 8388608us:00 8388608 - 16777216us:00 16777216 - 33554432us:00 33554432 - 67108864us:00 67108864 - 134217728us:00 134217728 - 268435456us:00
#或者测试8K的随机读写
[root@rac1 u01]# /u01/oracle/product/12.1.0/dbhome_1/bin/orion -run advanced -num_large 0 -size_small 8 -type rand -simulate raid0 -write 0 -duration 10 -matrix row -testname iotest ORION: ORacle IO Numbers -- Version 12.1.0.2.0 iotest_20161012_0146 Calibration will take approximately 2 minutes. Using a large value for -cache_size may take longer. Maximum Small IOPS=157 @ Small=5 and Large=0 Small Read Latency: avg=31745 us, min=73 us, max=232564 us, std dev=18154 us @ Small=5 and Large=0 Minimum Small Latency=6909 usecs @ Small=1 and Large=0 Small Read Latency: avg=6909 us, min=50 us, max=205640 us, std dev=8379 us @ Small=1 and Large=0 Small Read / Write Latency Histogram @ Small=1 and Large=0 Latency:# of IOs (read) # of IOs (write) 0 - 1us:00 2 - 4us:00 4 - 8us:00 8 - 16us:00 16 - 32us:00 32 - 64us:4230 64 - 128us:1650 128 - 256us:30 256 - 512us:30 512 - 1024us:00 1024 - 2048us:10 2048 - 4096us:200 4096 - 8192us:1720 8192 - 16384us:5700 16384 - 32768us:860 32768 - 65536us:30 65536 - 131072us:00 131072 - 262144us:10 262144 - 524288us:00 524288 - 1048576us:00 1048576 - 2097152us:00 2097152 - 4194304us:00 4194304 - 8388608us:00 8388608 - 16777216us:00 16777216 - 33554432us:00 33554432 - 67108864us:00 67108864 - 134217728us:00 134217728 - 268435456us:00
版权声明:本文为博主原创文章,未经博主允许不得转载。
orion