Orion使用手记
今天接到一个任务,进行数据库的IO压力测试,是否可以达到每5分钟12G的写入速度。自己分析了一下,也就是平均mbps需要达到:(12 *1024 * 8) / (5 * 60) = 327mbps.但是怎么测呢?使用什么工具?开始google:oracle io stress.发现oracle自己有一个工具orion用于模拟在oracle的io,这个工具可以在不安装oracle的情况下进行测试。于是打算在自己的机器上做一个实验。
1. 首先检测自己的机器:
[leisore@dgn ~]$ uname -a
Linux 2.6.18-194.26.1.el5x86_64 x86_64 x86_64 GNU/Linux
## 是64位的
2. 下载合适的orion:
网址:http://www.oracle.com/technetwork/topics/index-089595.html
选择下载Linux (x86-64)
3. 上传至机器然后解压:
[leisore@dgn~]$gunzip orion_linux_x86-64.gz
[leisore@dgn ~]$ls –al
-rwr-r-x 1 leisore hadoop 46350238 02-22 14:29 orion_linux_x86-64
## 只有一个可执行文件,授权
[leisore@dgn ~]$chmod +x orion_linux_x86-64
4. 设置环境变量
## 为了方便将它加入了PATH
[leisore@dgn~]$export PATH=$PWD/orion_linux_x86-64
## 看到官方手册,它依赖于libaio,查看是否有
[leisore@dgnstress]$ whereis libaio
libaio: /usr/lib/libaio.a /usr/lib/libaio.so /usr/include/libaio.h
## 设置LB_LIBRAYRY_PATH
[leisore@dgn stress]$export LB_LIBRAYRY_PATH=/usr/lib/
5. 运行
## 查看挂载点
[leisore@dgn]$ df -k
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda3 147229664 99243332 40386784 72% /
/dev/sda1 101086 23886 71981 25% /boot
tmpfs 1983980 532012 1451968 27% /dev/shm
## 编写lun文件并保存
Vi case1.lun
/dev/sda1
/dev/sda3
##运行
[leisore@dgn]$ orion_linux_x86-64 -run dss -testname case1
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
case1_20110222_1531
Test will take approximately 69 minutes
Larger caches may take longer
orion_spawn: skgpspawn failed: Error category: 27155, Detail: 2
orion_main: orion_spawn failed
Non test error occurred
Orion exiting
##异常了,所有的csv文件都是空的,开始google,很久了发现有一篇文章提到,必须使用orion的全路径,继续:
[leisore@dgn case1]$ /home/leisore/bin/orion_linux_x86-64 -run dss-testname case1
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
case1_20110222_1539
Test will take approximately 69 minutes
Larger caches may take longer
storax_skgfr_openfiles: File identification failed on /dev/sda1
OER 27041: please look up error in Oracle documentation
Linux-x86_64 Error: 13: Permission denied
Additional information: 2
rwbase_lio_init_luns: lun_openvols failed
rwbase_rwluns: rwbase_lio_init_luns failed
orion_thread_main: rw_luns failed
Non test error occurred
Orion exiting
## 异常了,但是这次就比较明显了,是权限不够,于是在root下运行
[root@dgn case1]#/home/leisore/bin/orion_linux_x86-64 -run dss -testname case1
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
case1_20110222_1540
Test will take approximately 69 minutes
Larger caches may take longer
## 产看生成的文件以及图标分析
case1_20110222_1540_summary.txt
ORION VERSION 11.1.0.7.0
Commandline:
-run dss -testname case1
This maps to this test:
Test: case1
Small IO size: 8 KB
Large IO size: 1024 KB
IO Types: Small Random IOs, Large Random IOs
Simulated Array Type: CONCAT
Write: 0%
Cache Size: Not Entered
Duration for each Data Point: 240 seconds
Small Columns:, 0
Large Columns:, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30
Total Data Points: 17
Name: /dev/sda1 Size:106896384
Name: /dev/sda3 Size:155638748160
2 FILEs found.
Maximum Large MBPS=27.80 @ Small=0 and Large=4
## 不知大为啥只产生了MBPS的统计和csv文件