oracle orion —— 测试io性能的工具!

Oracle orion

orion,一款由Oracle公司提供,专门用于模拟数据库运行机制来测试存储的优秀IO存储测试软件,可以在不运行oracle数据库的情况下,仿真OLTP随机操作(测试IOPS)或者是OLAP连续性操作(测试吞吐量)。

下载地址:http://www.oracle.com/technetwork/topics/index-089595.html

IOPS (Input/Output Per Second)即每秒的输入输出量(或读写次数),是衡量磁盘性能的主要指标之一。IOPS是指单位时间内系统能处理的I/O请求数量,一般以每秒处理的I/O请求数量为单位,I/O请求通常为读或写数据操作请求。
Mbps (MB per Second)传输速率是指集线器的数据交换能力,也叫“带宽”,单位是Mbps(兆位/秒)。

测试命令示例
1、数据库OLTP类型,假定IO类型全部是8K随机操作,压力类型,自动加压,从小到大,一直到存储压力极限

#./orion -run advanced -testname dave -num_disks 1 -size_small 8 -size_large 8 -type rand
2、数据库OLAP类型,吞吐量测试,假定IO全部是1M的序列性IO
#./orion -run advanced -testname mytest -num_disks 96 -size_small 1024 -size_large 1024 -type seq


必选输入参数:(run、testname、num_disks)

run:测试运行的层次,这个选项提供simple,normal,advanced的层次。
Simple:简单的测试小的随机的IO(默认8k)以及大IO的连续的IO(默认1024K)。在这个选项中,小的随机的IO和大的连续的IO是分开测试的。这个参数对应下列的Orion调用:

 ./orion -run advanced -testname mytest -num_disks 4 -size_small 8 -size_large 1024 -type rand -simulate concat -write 0 -duragion 60 -matrix basic
Normal: 除了simple的功能外,还会产生小的随机的IO和大的连续的IO的结合。这个参数对应下列的Orion调用:
 ./orion -run advanced -testname mytest -num_disks 4 -size_small 8 -size_large 1024 -type rand -simulate concat -write 0 -duragion 60 -matrix detailed
Advanced: 用这个选项,用户需要指定可选的参数。

testname: 输入文件必须是<testname>.lun。在这里只需要输入<testname>,不需要文件的后缀名,输入了反而会报错。
num_disks: 实际测试的物理磁盘的数目。


可选的输入参数:
size_small: 小的随机工作量的IO的大小(KB)。
size_large: 大的随机的或者连续工作量的大小(KB)。

type:大的IO的工作类型(默认是rand):
 rand:大的随机的IO。
 seq:大的连续的IO。

write: 和读相比的写的百分比,这个参数在小的随机的和大的连续的IO工作量下适用。在大的连续的IO,每个读写流要么是读要么是写。这个参数是指只是写百分比。写的数据都是垃圾数据。 写的测试将破坏的指定的lun。

num_streamIO: 每个大的连续读写流的IO数目。只是在-type seq下使用。

simulate:大的连续的IO工作量小的数据分布。
 contact:串联指定的luns成一个虚拟的卷。在虚拟的卷上的连续的测试从某个点到一个lun的结束点。然后再到下一个lun。
 raid0:在指定的luns上条带化成一个虚拟的卷。条带的大小是1M(和asm的条带大小一致),可以通过参数-stripe来更改。

cache_size: 存储阵列的读写缓存大小(MB)。针对大的连续的IO工作量,Orion将在每个测试点之前warm的cache。使用缓存大小来决定缓存操作。如果没有指定,将有个默认值。如果是0的话,将没有warm缓存。

duration: 每个测试点的时间。(默认是60)

matrix: 混合工作量测试的类型
 basic:没有混合的工作量,小的随机的IO和大的连续的IO分开测试。
 detailed:小的随机的IO和大的连续的IO结合起来测试。
 point: 单个测试点,S代表小的随机的IO,L代表大的随机/连续的IO。S -num_small L -num_large
 col: 大的随机/连续的IO
 row: 小的随机的IO
 max:和detailed一样,只是在最大的负载下测试工作量。可以用-num_small和 -num_large参数指定。

num_small: 小的随机的IO的最大数目。
num_large: 大的随机的IO或者一个读写流的并发数目。

verbose:打印进度和状态到控制台。

该软件的运行只需要一个配置文件,<testname>.lun,配置了测试所需要用到的磁盘信息,而分别返回如下信息:
<testname>_iops.csv:不同压力类型的IOPS值
<testname>_mbps.csv:不同压力类型的吞吐量
<testname>_lat.csv:不同压力类型下的响应时间
<testname>_summary.txt:测试结果的汇总信息


如果你的数据库IO请求主要是单个块,那就关注IOPS,如果数据库IO请求主要是多个块,那就关注MBPS。
10gR2数据库:可以从视图v$sysstat得到IO的类型。
 单个数据块的读:"physical read total IO requests" - "physical read total multi block requests"
 多个数据块的读:"physical read total multi block requests"
 读的总和:"physical read total IO requests"
 单个数据块的写:"physical write total IO requests" - "physical write total multi block requests"
 多个数据块的写:"physical write total multi block requests"
 写的总和:"physical write total IO requests"

SQL> select name, value from v$sysstat
where name in ('physical read total IO requests',
        'physical read total multi block requests',
        'physical write total IO requests',
        'physical write total multi block requests');  

NAME								      VALUE
---------------------------------------------------------------- ----------
physical read total IO requests 				   26266365
physical read total multi block requests			   25005766
physical write total IO requests				   22009267
physical write total multi block requests			   11784636
看上面的数据库很明显就是传说中的数据库仓库撒,全部是多个快的读写。
SQL> select name, value from v$sysstat
where name in ('physical read total IO requests',
        'physical read total multi block requests',
        'physical write total IO requests',
        'physical write total multi block requests');  

NAME								      VALUE
---------------------------------------------------------------- ----------
physical read total IO requests 				    4187936
physical read total multi block requests			     581451
physical write total IO requests				    3425116
physical write total multi block requests			     719574
看上面的数据库就是OLTP数据库,单个块的读写占大部分。

开始使用Orion

安装orion

[root@linux orion]# pwd
/opt/orion
[root@linux orion]# ll
总计 11640
-rw-r--r-- 1 root root 11901381 05-30 22:07 orion_linux_x86.gz
[root@linux orion]# gunzip orion_linux_x86.gz 
[root@linux orion]# mv orion_linux_x86 orion
[root@linux orion]# chmod 777 orion 
[root@linux orion]# ll
总计 37300
-rwxrwxrwx 1 root root 38148082 05-30 22:07 orion
选择测试名,可以看见test1就是我们的测试名字。
[root@linux orion]# ll
总计 37304
-rwxrwxrwx 1 root root 38148082 05-30 22:07 orion
-rw-r--r-- 1 root root       18 05-30 22:18 test1.lun
[root@linux orion]# cat test1.lun 
/dev/sdb
/dev/sdc
验证设备是不是可以访问
[root@linux ~]# dd if=/dev/sdb of=/dev/null bs=32k count=1024
1024+0 records in
1024+0 records out
33554432 bytes (34 MB) copied, 0.0224968 seconds, 1.5 GB/s
[root@linux ~]# dd if=/dev/sdc of=/dev/null bs=32k count=1024
1024+0 records in
1024+0 records out
33554432 bytes (34 MB) copied, 0.044479 seconds, 754 MB/s
开始测试
[root@linux orion]# ./orion -run advanced -testname test1 -num_disks 2 -size_small 8 -size_large 8 -type rand
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
test1_20120530_2220
Test will take approximately 16 minutes
Larger caches may take longer
输出文件
[root@linux ~]# cd /opt/orion/
[root@linux orion]# ll
总计 37312
-rwxrwxrwx 1 root root 38148082 05-30 22:07 orion
-rw-r--r-- 1 root root        0 05-30 22:20 test1_20120530_2220_iops.csv
-rw-r--r-- 1 root root        0 05-30 22:20 test1_20120530_2220_lat.csv
-rw-r--r-- 1 root root        0 05-30 22:20 test1_20120530_2220_mbps.csv
-rw-r--r-- 1 root root      348 05-30 22:20 test1_20120530_2220_summary.txt
-rw-r--r-- 1 root root      787 05-30 22:22 test1_20120530_2220_trace.txt
-rw-r--r-- 1 root root       18 05-30 22:18 test1.lun

测试结果的汇总信息test1_20120530_2220_summary.txt

[root@linux orion]# cat test1_20120530_2220_summary.txt
ORION VERSION 11.1.0.7.0

Commandline:
-run advanced -testname test1 -num_disks 2 -size_small 8 -size_large 8 -type rand       --测试命令

This maps to this test:         --下面是测试参数
Test: test1
Small IO size: 8 KB
Large IO size: 8 KB
IO Types: Small Random IOs, Large Random IOs
Simulated Array Type: CONCAT
Write: 0%
Cache Size: Not Entered
Duration for each Data Point: 60 seconds
Small Columns:,      0
Large Columns:,      0,      1,      2,      3,      4
Total Data Points: 15

Name: /dev/sdb  Size: 8589934592  --可以看见测试的磁盘大小是8G
Name: /dev/sdc  Size: 8589934592
2 FILEs found.

Maximum Large MBPS=40.95 @ Small=0 and Large=3     --大io的mbps
Maximum Small IOPS=7454 @ Small=10 and Large=0     --小io的iops
Minimum Small Latency=0.29 @ Small=1 and Large=0   --小io的响应时间
test1_20120530_2220_mbps.csv 这是个csv文件。包含大的随机或者连续的IO工作量。所有的csv输出文件有个2维表。行代表大的IO负载层次。列代表小的IO负载层次。由于这个测试不包含大的和小的IO结合。所以MBPS文件只有一个列,0代表没有小的IO。
[root@linux orion]# cat test1_20120530_2220_mbps.csv
Large/Small,      0,      1,      2,      3,      4,      5,      6,      7,      8,      9,     10
          1,  23.34
          2,  32.46
          3,  40.95
          4,  40.53
test1_20120530_2220_iops.csv 这是个小的随机的IO工作量的IOPS吞吐量。
[root@linux orion]# cat test1_20120530_2220_iops.csv
Large/Small,      1,      2,      3,      4,      5,      6,      7,      8,      9,     10
          0,   3438,   4663,   5193,   5349,   5498,   5542,   6741,   6863,   7209,   7454
          1
          2
          3
          4
test1_20120530_2220_lat.csv 这是个小的随机的IO工作量下的延迟时间。
[root@linux orion]# cat test1_20120530_2220_lat.csv
Large/Small,      1,      2,      3,      4,      5,      6,      7,      8,      9,     10
          0,   0.29,   0.43,   0.58,   0.75,   0.91,   1.08,   1.04,   1.16,   1.24,   1.33
          1
          2
          3
          4
test1_20120530_2220_trace.txt 包含扩展的,未处理的测试输出。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值