Orion测试磁盘性能

1.简介

Orion和Oracle采用了相同的IO技术栈(Orion is expressly designed for simulating Oracle database I/O workloads using the same I/O software stack as Oracle),所以可以在不安装Oracle数据库的情况下,测试磁盘是否满足数据库的需求。

2.下载安装

Orion下载地址

下载对应的版本后上传到服务器,解压

gunzip orion_linux_x86-64.gz

3.预测数据库的IO情况

本次测试时为了测试新存储是否能够满足Oracle的需求,因为我们的Oracle数据库的负载基本相同,所以通过查看现有数据库的IO情况,可以方便我们测试参数的设置

--single-block reads        1225841050
select * from v$sysstat where name='physical read total IO requests';
--multi-block reads         66884306
select * from v$sysstat where name='physical read total multi block requests';
--bytes read                    82066240613376
select * from v$sysstat where name='physical read total bytes';
--single-block writes       9139627566
select * from v$sysstat where name='physical write total IO requests';
--multi-block writes        157501520
select * from v$sysstat where name='physical write total multi block requests';
--bytes written             111921037188608
select * from v$sysstat where name='physical write total bytes';

select 111921037188608/(111921037188608+82066240613376) from dual
--通过上面的分析,目前数据库写占比60%,以单块读写为主

4.测试

4.1.参数介绍

# 解压后,是一个二进制程序,添加执行属性
chmod +x orion_linux_x86-64
# 查看帮助
./orion_linux_x86-64 -help
- run               #Type of workload to run (simple, normal, advanced, dss, oltp),负载的类型,其中advance可以自定义,例如读写比例
- testname	    #lun文件名,lun文件中写测试点名称(需要满足能执行dd if=/dev/mapper/archlog1 of=/dev/null bs=8K count=1024),会生成以testname为前缀的测试报告
- num_disks	    #测试点数量
- size_small        #小IO大小,默认8KB
- size_large        #大IO大小,默认1M
- type              #随机读写还是顺序读写,默认值随机
- num_streamIO	    #一次顺序读写,同时几个IO,默认是4
- write             #写占的比例
- duration          #每个测试点测试时长,默认60S
- num_small         #最小的压测级别(level)
- num_large         #最大的压测级别
- matrix #detailed  #大小随机读写同时进行,basic先测试小的随机读,再测试大的随机读

4.2.测试

# 8KB大小块,60%写,随机读写,测试OLTP类型的IOPS和延时
./orion_linux_x86-64 -run advanced -testname testa -size_small 8 -size_large 8 -write 60 -type rand -matrix detailed -duration 300
# 1M的IO,每次顺序读写4M,测试吞吐量
./orion_linux_x86-64 -run advanced -testname testb  -size_large 1M -write 90 -type seq -matrix col -duration 600
posted @ 2021-10-28 14:11  monkey6  阅读(190)  评论(0编辑  收藏  举报