Oracle ORION模拟Database负载测试存储性能

    Oracle ORION(Oracle IO Number )是Oracle提供的存储性能测试工具,Oracle并不对其提供技术支持。该工具的最大特点在于可以在没安装Oracle Database 软件的情况下,模拟Oracle负载,测试 随机或顺序访问指定 大小块的性能,性能指标包括:IOPS,MBPS, Latency(延迟时间)。
   从Oracle Database 11g开始,ORION工具被集成 到GI和Database软件中,所以在$GI_HOME/bin和$ORACLE_HOME/bin目录下都可以找到这个工具。如果是Oracle Database  10gR2需要手动下载ORION工具。

1.下面是$GI_HOME/bin目录下的ORION工具。
[root@rhel1 ~]#cd /u01/app/11.2.0/grid/bin
[root@rhel1 bin]# ./orion -help
ORION: ORacle IO Numbers -- Version 11.2.0.2.0

ORION runs IO performance tests that model Oracle RDBMS IO workloads.
It measures the performance of small (2-32K) IOs and large (128K+) IOs
at various load levels. 

Each Orion data point is a test for a specific mix of small and large 
IO loads sustained for a duration.  An Orion test consists of multiple 
data point tests.  These data point tests can be represented as a 
two-dimensional matrix.  Each column in the matrix represents data 
point tests with the same small IO load, but varying large IO loads.  
Each row represents data point tests with the same large IO load, but 
varying small IO loads.  An Orion test can be for a single point, a 
single row, a single column, or the whole matrix.

The 'run' parameter is the only mandatory parameter. Defaults
are indicated for all other parameters.  For additional information on
the user interface, see the Orion User Guide.

is the prefix used for all input and output filenames.  By
default, it is 'orion'.  It can be specified with the 'testname' 
parameter.

.lun should contain a carriage-return-separated list of LUNs.

The output files for a test run are prefixed by _ where
date is "yyyymmdd_hhmm".

The output files are: 
__summary.txt -  Summary of the input parameters, along with 
                                 the minimum small IO latency (in usecs), the maximum 
                                 MBPS, and the maximum IOPS observed. 
__mbps.csv - Performance results of large IOs in MBPS.
__iops.csv - Performance results of small IOs in IOPS.
__lat.csv - Latency of small IOs in microseconds.
__hist.csv - Histogram of IO latencies.
__trace.txt - Extended, unprocessed output.

WARNING: IF YOU ARE PERFORMING WRITE TESTS, BE PREPARED TO LOSE ANY DATA STORED
ON THE LUNS.
如果执行写测试,存储在LUN中的数据会丢失!

Mandatory parameters:
run                     Type of workload to run (simple, normal, advanced, dss, oltp).
                          simple   - Tests random small (8K) IOs at various loads,
                                     then random large (1M) IOs at various loads.
                          normal   - Tests combinations of random small (8K) IOs and 
                                     random large (1M) IOs.
                          advanced - Tests the workload specified by the user 
                                     using optional parameters.
                          dss      - Tests with random large (1M) IOs at increasing 
                                     loads to determine the maximum throughput.
                          oltp     - Tests with random small (8K) IOs at increasing 
                                     loads to determine the maximum IOPS.

该版本的ORION工具只有run是必选参数。
simple   在可变负载的情况下测试随机小IO(8K),然后再在可变负载的情况下测试随机大IO(1M)的性能。
normal   测试随机小IO(8K)和随机大IO(1M)的性能。
advanced 通过使用可选的参数自定义负载情况。
dss      在负载不断增加的情况下测试随机大IO(1M),找出最大的吞吐量。
oltp     在负载不断增加的情况下测试随机小IO(8K),找出最大的IOPS值。


Optional parameters:
testname                Name of the test run.

num_disks               Number of disks (physical spindles).  This number is 
                        used to gauge the range of loads that Orion should test 
                        at.  Increasing this parameter results in Orion using 
                        heavier IO loads.  Default is the number of LUNs in 
                        .lun.
默认测试 .lun包含的所有LUN。

size_small              Size of small IOs in KB.  Default is 8.  默认8K。

size_large              Size of large IOs in KB.  Default is 1024. 默认1024K。

type                    Type of large IOs (rand, seq).  Default is rand.
                          rand - Randomly distributed large IOs.
                          seq  - Sequential streams of large IOs.

num_streamIO            Number of concurrent IOs per stream.  This parameter is only 
                        used if -type is seq.  Default is 4.

simulate                Orion tests on a virtual LUN formed by combining the
                        specified LUNs in one of these ways.  This parameter is 
                        typically only used if -type is seq.  Default is concat.
                          concat - A serial concatenation of the LUNs.  Each 
                                   sequential stream issues IOs to only one LUN. 
                          raid0  - A RAID-0 mapping across the LUNs.  Each 
                                   sequential stream issues IOs across all LUNs, 
                                   using RAID-0 striping.

write                   Percentage of IOs that are writes (SEE WARNING ABOVE).
                        Default is 0.

cache_size              Size in MBs of the array's cache.
                        Unless this option is set to 0, Orion issues a number
                        of unmeasured, random IOs before each large sequential
                        data point.  These IOs fill up the storage array's cache
                        (if any) with random data so that IOs from one
                        data point do not result in cache hits for the next
                        data point.  Read tests are preceded with junk reads
                        and write tests are preceded with junk writes.  If
                        specified, this 'cache warming' is performed until
                        cache_size MBs of IO have been read or written.
                        Default behavior is to issue 2 minutes of unmeasured random 
                        IOs before each data point.
据说在AIX平台,cache_size的值对测试结果影响较大,并不能真实的反应存储的性能;在Linux平台不存在此问题, 测试的结果较准确。

duration                Duration of each data point in seconds.  Default is 60.
duration指定每个数据指针持续的时间,默认60秒。

num_small               Number of outstanding small IOs.  This parameter controls the 
                        small IO load.  Only used if -matrix is point, col, or max.  
                        No default.

num_large               This parameter controls the large IO load.
                        For -type rand, number of outstanding large IOs.
                        For -type seq, number of sequential IO streams.  Only used 
                        if -matrix is point, row, or max.  No default.

matrix                  An Orion test consists of multiple data point tests.  These data 
                        point tests can be represented as a two-dimensional matrix. 
                        Each column in the matrix represents data point tests with 
                        the same small IO load, but varying large IO loads.  Each 
                        row represents data point tests with the same large IO load, 
                        but varying small IO loads.  An Orion test can be for a 
                        single point, a single row, a single column, or the whole 
                        matrix, depending on the matrix option setting below. 
                        Default is basic.
                          basic    - Test small IOs only, then large IOs only.
                          detailed - Test entire matrix.
                          point    - Test with num_small small IOs, num_large large 
                                     IOs.
                          col      - Test a varying large IO load with num_small 
                                     small IOs.
                          row      - Test a varying small IO load with num_large 
                                     large IOs.
                          max      - Test varying loads up to the num_small and 
                                     num_large limits.

verbose                 Prints tracing information to standard output if set.
                        Not set by default.

Examples:
For a preliminary set of data
        -run simple 
For a basic set of data
        -run normal 
To evaluate storage for an OLTP database
        -run oltp 
To evaluate storage for a data warehouse
        -run dss 
To generate combinations of 32KB and 1MB reads to random locations
        -run advanced 
        -size_small 32 -size_large 1024 -type rand 
        -matrix detailed
To generate multiple sequential 1MB write streams, simulating RAID0 striping
        -run advanced 
        -simulate RAID0 -write 100 -type seq
        -matrix col -num_small 0


2.下面是实际的测试操作。

1).创建LUN配置文件。
在~目录下创建orion.lun文件,将如下内容添加到文件中:
/dev/sdj1

在没有指定名称的情况下,orion是默认名称,.lun是固定的扩展名;执行命令时如果指定testname参数,那么对应的值不需要指定.lun扩展名。

2).执行orion测试。

[root@rhel1 ~]# /u01/app/11.2.0/grid/bin/orion -run simple
ORION: ORacle IO Numbers -- Version 11.2.0.2.0
orion_20140407_2028
Calibration will take approximately 9 minutes.
Using a large value for -cache_size may take longer.
这里显示测试时间为9分钟,ORION测试时长无法控制。

Maximum Large MBPS=35.13 @ Small=0 and Large=2
这句的含义是:最大吞吐量为35.13MB,是在测试第二个大IO(1M )得出的值,查看生成的trace文件可以看到有关第二个大IO的详细信息。

Maximum Small IOPS=86 @ Small=5 and Large=0
Small Read Latency: avg=57862 us, min=12943 us, max=270920 us, std dev=25577 us @ Small=5 and Large=0
这段的含义是:最大小IO的IOPS值为86,是在测试第5个小IO(8K)得出的值。
小IO读的延迟情况,平均值/最小值/最大值。

    有关时间单位的说明:
    国际单位制词头经常与秒结合以做更细微的划分,例如ms(毫秒,千分之一秒)、us(微秒,百万分之一秒)和ns(纳秒,十亿分之一秒)。虽然国际单位制词头虽然也可以用于扩增时间,例如ks(千秒)、Ms(百万秒)和Gs(十亿秒),但实际上很少这样子使用,大家都还是习惯用60进制的分、时和24进制的日做为秒的扩充。

Minimum Small Latency=15313 usecs @ Small=1 and Large=0
Small Read Latency: avg=15313 us, min=726 us, max=231989 us, std dev=24119 us @ Small=1 and Large=0
这段的含义是:小IO测试的最小延迟是15313微妙(也就是15毫秒),是在测试第1个小IO得出的值。
小IO读测试的延迟情况,平均值/最小值/最大值。

Small Read / Write Latency Histogram @ Small=5 and Large=0 
下面是小IO读写延迟柱状图:
        Latency:                # of IOs (read)          # of IOs (write) 
        0 - 1           us:             0                       0
        2 - 4           us:             0                       0
        4 - 8           us:             0                       0
        8 - 16          us:             0                       0
       16 - 32          us:             0                       0
       32 - 64          us:             0                       0
       64 - 128         us:             0                       0
      128 - 256         us:             0                       0
      256 - 512         us:             0                       0
      512 - 1024        us:             14                      0
     1024 - 2048        us:             21                      0
     2048 - 4096        us:             257                     0
     4096 - 8192        us:             1220                    0
     8192 - 16384       us:             1994                    0
    16384 - 32768       us:             82                      0
    32768 - 65536       us:             158                     0
    65536 - 131072      us:             127                     0
   131072 - 262144      us:             49                      0
   262144 - 524288      us:             0                       0
   524288 - 1048576     us:             0                       0
  1048576 - 2097152     us:             0                       0
  2097152 - 4194304     us:             0                       0
  4194304 - 8388608     us:             0                       0
  8388608 - 16777216    us:             0                       0
 16777216 - 33554432    us:             0                       0
 33554432 - 67108864    us:             0                       0
 67108864 - 134217728   us:             0                       0
134217728 - 268435456   us:             0                       0
大部分的IO延迟都处在 8192 - 16384us之间。

命令执行完成之后,在执行命令时的目录下产生了如下的文件:
[root@rhel1 ~]# ll
total 104
-rw------- 1 root root  1076 Jun 17  2011 anaconda-ks.cfg
-rwxrwxrwx 1 root root   116 May  8  2009 ctss.sh
drwxr-xr-x 2 root root  4096 Jun 17  2011 Desktop
-rw-r--r-- 1 root root 33383 Jun 17  2011 install.log
-rw-r--r-- 1 root root  3682 Jun 17  2011 install.log.syslog
-rw-r----- 1 root root   580 Mar 24 00:34 oks.log
drwxr-xr-x 3 root root  4096 May 13  2012 oradiag_root
-rw-r--r-- 1 root root  7004 Apr  7 20:35 orion_20140407_2028_hist.txt 柱状图情况,包括每个数据指针操作期间(默认60秒)的IO延迟柱状图
-rw-r--r-- 1 root root   526 Apr  7 20:35 orion_20140407_2028_iops.csv IOPS情况
-rw-r--r-- 1 root root   554 Apr  7 20:35 orion_20140407_2028_lat.csv 延迟情况
-rw-r--r-- 1 root root   498 Apr  7 20:35 orion_20140407_2028_mbps.csv MBPS情况
-rw-r--r-- 1 root root  1743 Apr  7 20:35 orion_20140407_2028_summary.txt 概要
-rw-r--r-- 1 root root  3242 Apr  7 20:35 orion_20140407_2028_trace.txt 详细的跟踪文件
-rw-r--r-- 1 root root    10 Apr  7 20:04 orion.lun

3).查看测试结果。

a).IOPS测试结果:
我们可以非常容易的将orion_20140407_2028_iops.csv文件以图的形式展现出来:


最高的IOPS大概为85,有些文章说横坐标表示的是并发度,我们可以认为它是一个负载强度。

b).Latency测试结果:
将orion_20140407_2028_lat.csv数据以图表的形式展现出来:

IO延迟在50~60毫秒之间。

c).MBPS测试结果:
查看orion_20140407_2028_mbps.csv文件:

24.98表示小IO的吞吐量。
35.12表示大IO的吞吐量。

3.使用DD对磁盘进行快速而直接的测试。

执行下面的命令测试文件系统的写性能:
[root@homeserver /]# time sh -c "dd if=/dev/zero of=dd-test-file bs=8k count=1000000 && sync"
1000000+0 records in
1000000+0 records out
8192000000 bytes (8.2 GB) copied, 139.084 seconds, 58.9 MB/s

real    2m26.057s(表示真实时间
user    0m1.360s
sys     0m24.854s

参考文章:http://www.oracle-base.com/articles/misc/measuring-storage-performance-for-oracle-systems.php

--end--

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23135684/viewspace-1137724/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23135684/viewspace-1137724/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值