签到成功

知道了

CNDBA社区CNDBA社区

Orion 测试I/O的工具使用方法

2016-10-11 19:47 5233 0 原创 Oracle 性能优化
作者: Expect-乐

1.工具说明:

  Oracle自带的一个测试I/O的工具,可以随机读写,摸你混合负载等。http://www.cndba.cn/Expect-le/article/290

http://www.cndba.cn/Expect-le/article/290
http://www.cndba.cn/Expect-le/article/290

无需安装Orion,配置好LD_LIBRARY_PATH环境变量即可。http://www.cndba.cn/Expect-le/article/290

如:LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

2.使用方法

http://www.cndba.cn/Expect-le/article/290

#直接输入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.

具体例子:http://www.cndba.cn/Expect-le/article/290

[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。

#创建配置文件http://www.cndba.cn/Expect-le/article/290

[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的随机读写http://www.cndba.cn/Expect-le/article/290

[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


http://www.cndba.cn/Expect-le/article/290http://www.cndba.cn/Expect-le/article/290

版权声明:本文为博主原创文章,未经博主允许不得转载。

orion

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
Expect-乐

Expect-乐

关注

Without the continuous bitter cold, there can be no fragrant plum blossom

  • 336
    原创
  • 6
    翻译
  • 100
    转载
  • 41
    评论
  • 访问:1378768次
  • 积分:1957
  • 等级:核心会员
  • 排名:第3名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ