阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

orion的简单测试

389次阅读
没有评论

共计 6135 个字符,预计需要花费 16 分钟才能阅读完成。

orion 是一个做 IO 测试的小巧工具,可以测试随机读写,模拟混合负载等。在 Oracle 11g 已经自带包含了这一工具,无须额外的安装了,为 IO 方面的测试带来了不少的便利。

当然如此简单的小工具我在使用时还是碰到了些小问题。简单总结一下。
首先是使用 orion, 直接提示依赖链接库的问题
[oracle@db117 bin]$ orion
orion: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
因为这个数据库是新安装的,所以感觉是不是克隆安装没初始化好,但是发现还是和变量 LD_LIBRARY_PATH 有关。
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/lib:/usr/X11R6/lib:/usr/local/lib
添加环境变量,就马上可以了。
[oracle@db117 ~]$ orion
ORION: ORacle IO Numbers — Version 11.2.0.4.0
Error in input parameters.  For help, run: orion -help.
orion 就这样正式启用了,就如同 sqlplus 一样,都是 $ORACLE_HOME/bin 小的小工具。
我们测试的环境如下,使用的是机械硬盘。
[oracle@db117 ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5      9.9G  2.4G  7.0G  26% /
tmpfs            32G    0  32G  0% /dev/shm
/dev/sda1      388M  62M  307M  17% /boot
/dev/sda6      1.1T  92G  908G  10% /home
/dev/sda2        20G  344M  19G  2% /var
在使用 orion 的时候,需要定义一个文件,以.lun 结尾。比如 iotest.lun
我们要测试的设备为 /dev/sda6,在 iotest.lun 里面就写这个设备即可。
可以使用下面的方式来尝试启用 testname 对应的参数值就是 iotest
orion -run oltp -testname iotest
当然这个命令使用还是有一些小技巧的,比如直接启用,会有下面的错误。
[oracle@db117 temp]$ orion -run oltp -testname iotest
ORION: ORacle IO Numbers — Version 11.2.0.4.0
************************ Large Pages Information *******************
Parameter use_large_pages = onlyPer process system memlock (soft) limit = 64 KB
Large Pages unused system wide = 0 (0 KB)
Large Pages configured system wide = 0 (0 KB)
Large Page size = 2048 KB 
ERROR:
Failed to allocate shared global region with large pages, unix errno = 1.
Aborting the run of Orion.  ORA-27137: unable to allocate Large Pages to create a shared memory segment
ACTION:
1. Check the permission to access system large pages.
2. Large pages are automatically locked into physical memory.
Increase the per process memlock (soft) limit to at least 8192 KB to lock
100% Orion I/O Buf Area’s large pages into physical memory
*******************************************************************
Increase huge pages as suggested or set  -hugenotneeded flag on command line
Failed to create shared memory of size 1051296 (orion_setup_shmem:skgmcreate)
Linux-x86_64 Error: 1: Operation not permitted
Additional information: 2097152
orion_parse_args: orion_setup_shmem failed
当然提示信息已经很明显了,当前环境没有配置大页,所以还是需要配置大页或者声明不需要大页。
可以使用 hugenotneeded 来声明,当然还是有一些小问题。
[oracle@db117 temp]$ orion -run simple -testname iotest -hugenotneeded
ORION: ORacle IO Numbers — Version 11.2.0.4.0
iotest_20160420_1609
Calibration will take approximately 9 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.
这个命令要求使用完整路径,不要用相对路径,修改为完整路径继续测试。
[oracle@db117 temp]$ $ORACLE_HOME/bin/orion -run simple -testname iotest -hugenotneeded
ORION: ORacle IO Numbers — Version 11.2.0.4.0
iotest_20160420_1610
Calibration will take approximately 9 minutes.
Using a large value for -cache_size may take longer.

Error identifying file /dev/sda6 (storax_skgfr_openfiles:skgfifi)
ORA-27041: see Oracle documentation for information on error
Linux-x86_64 Error: 13: Permission denied
Additional information: 9
Test aborted due to errors.
这个时候提示是权限不足,原来使用的 oracle 用户没有更高的权限来操作 /dev/sda6,所以可以调整权限或者直接使用 root 来运行。
使用 dd 命令来测试 /dev/sda6 是否可用。
[root@db117 ~]# dd if=/dev/sda6 of=/dev/null bs=32k count=1024
1024+0 records in
1024+0 records out
33554432 bytes (34 MB) copied, 0.052941 s, 634 MB/s
当然把 oracle 用户下的.bash_profile 中的环境变量初始化到 root 用户下,即可使用 orion
如果想简单一试,可以使用下面的命令,生成的测试时间是不能改动的。简单等待之后,输出的简单报告如下
[root@db117 temp]# /U01/app/oracle/product/11.2.0.4/bin/orion  -run simple -testname iotest -hugenotneeded
ORION: ORacle IO Numbers — Version 11.2.0.4.0
iotest_20160420_1631
Calibration will take approximately 9 minutes.
Using a large value for -cache_size may take longer.
Maximum Large MBPS=210.16 @ Small=0 and Large=2
Maximum Small IOPS=894 @ Small=5 and Large=0
Small Read Latency: avg=5591 us, min=32 us, max=35791 us, std dev=2949 us @ Small=5 and Large=0
Minimum Small Latency=4320 usecs @ Small=1 and Large=0
Small Read Latency: avg=4320 us, min=78 us, max=18253 us, std dev=1378 us @ Small=1 and Large=0
Small Read / Write Latency Histogram @ Small=1 and Large=0
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:            11                      0
128 – 256        us:            0                      0
256 – 512        us:            0                      0
512 – 1024        us:            2                      0
1024 – 2048        us:            538                    0
2048 – 4096        us:            5625                    0
4096 – 8192        us:            7680                    0
8192 – 16384      us:            22                      0
16384 – 32768      us:            1                      0
32768 – 65536      us:            0                      0
65536 – 131072      us:            0                      0
131072 – 262144      us:            0                      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
当然还可以使用 oltp 的选项来测试
/U01/app/oracle/product/11.2.0.4/bin/orion  -run oltp -testname iotest -hugenotneeded
[root@db117 temp]# /U01/app/oracle/product/11.2.0.4/bin/orion  -run oltp -testname iotest -hugenotneeded
ORION: ORacle IO Numbers — Version 11.2.0.4.0
iotest_20160420_1641
Calibration will take approximately 22 minutes.
Using a large value for -cache_size may take longer.
Maximum Small IOPS=1940 @ Small=20 and Large=0
Small Read Latency: avg=10305 us, min=42 us, max=209322 us, std dev=8938 us @ Small=20 and Large=0
Minimum Small Latency=4311 usecs @ Small=1 and Large=0
Small Read Latency: avg=4311 us, min=58 us, max=16964 us, std dev=1376 us @ Small=1 and Large=0
Small Read / Write Latency Histogram @ Small=1 and Large=0

或者测试 8k 的随机读写
/U01/app/oracle/product/11.2.0.4/bin/orion  -run advanced -num_large 0 -size_small 8 -type rand -simulate raid0 -write 0 -duration 10 -matrix row -testname iotest
[root@db117 temp]# /U01/app/oracle/product/11.2.0.4/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 11.2.0.4.0
iotest_20160420_1708
Calibration will take approximately 2 minutes.
Using a large value for -cache_size may take longer.
Maximum Small IOPS=895 @ Small=5 and Large=0
Small Read Latency: avg=5581 us, min=55 us, max=41177 us, std dev=2968 us @ Small=5 and Large=0

更多 Oracle 相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-04/130537.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计6135字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中

星哥玩云

星哥玩云
星哥玩云
分享互联网知识
用户数
4
文章数
19348
评论数
4
阅读量
7799347
文章搜索
热门文章
开发者必备神器:阿里云 Qoder CLI 全面解析与上手指南

开发者必备神器:阿里云 Qoder CLI 全面解析与上手指南

开发者必备神器:阿里云 Qoder CLI 全面解析与上手指南 大家好,我是星哥。之前介绍了腾讯云的 Code...
星哥带你玩飞牛NAS-6:抖音视频同步工具,视频下载自动下载保存

星哥带你玩飞牛NAS-6:抖音视频同步工具,视频下载自动下载保存

星哥带你玩飞牛 NAS-6:抖音视频同步工具,视频下载自动下载保存 前言 各位玩 NAS 的朋友好,我是星哥!...
云服务器部署服务器面板1Panel:小白轻松构建Web服务与面板加固指南

云服务器部署服务器面板1Panel:小白轻松构建Web服务与面板加固指南

云服务器部署服务器面板 1Panel:小白轻松构建 Web 服务与面板加固指南 哈喽,我是星哥,经常有人问我不...
我把用了20年的360安全卫士卸载了

我把用了20年的360安全卫士卸载了

我把用了 20 年的 360 安全卫士卸载了 是的,正如标题你看到的。 原因 偷摸安装自家的软件 莫名其妙安装...
星哥带你玩飞牛NAS-3:安装飞牛NAS后的很有必要的操作

星哥带你玩飞牛NAS-3:安装飞牛NAS后的很有必要的操作

星哥带你玩飞牛 NAS-3:安装飞牛 NAS 后的很有必要的操作 前言 如果你已经有了飞牛 NAS 系统,之前...
阿里云CDN
阿里云CDN-提高用户访问的响应速度和成功率
随机文章
星哥带你玩飞牛NAS-7:手把手教你免费内网穿透-Cloudflare tunnel

星哥带你玩飞牛NAS-7:手把手教你免费内网穿透-Cloudflare tunnel

星哥带你玩飞牛 NAS-7:手把手教你免费内网穿透 -Cloudflare tunnel 前言 大家好,我是星...
150元打造低成本NAS小钢炮,捡一块3865U工控板

150元打造低成本NAS小钢炮,捡一块3865U工控板

150 元打造低成本 NAS 小钢炮,捡一块 3865U 工控板 一块二手的熊猫 B3 工控板 3865U,搭...
还在找免费服务器?无广告免费主机,新手也能轻松上手!

还在找免费服务器?无广告免费主机,新手也能轻松上手!

还在找免费服务器?无广告免费主机,新手也能轻松上手! 前言 对于个人开发者、建站新手或是想搭建测试站点的从业者...
仅2MB大小!开源硬件监控工具:Win11 无缝适配,CPU、GPU、网速全维度掌控

仅2MB大小!开源硬件监控工具:Win11 无缝适配,CPU、GPU、网速全维度掌控

还在忍受动辄数百兆的“全家桶”监控软件?后台偷占资源、界面杂乱冗余,想查个 CPU 温度都要层层点选? 今天给...
星哥带你玩飞牛NAS-4:飞牛NAS安装istore旁路由,家庭网络升级的最佳实践

星哥带你玩飞牛NAS-4:飞牛NAS安装istore旁路由,家庭网络升级的最佳实践

星哥带你玩飞牛 NAS-4:飞牛 NAS 安装 istore 旁路由,家庭网络升级的最佳实践 开始 大家好我是...

免费图片视频管理工具让灵感库告别混乱

一言一句话
-「
手气不错
星哥带你玩飞牛NAS硬件02:某鱼6张左右就可拿下5盘位的飞牛圣体NAS

星哥带你玩飞牛NAS硬件02:某鱼6张左右就可拿下5盘位的飞牛圣体NAS

星哥带你玩飞牛 NAS 硬件 02:某鱼 6 张左右就可拿下 5 盘位的飞牛圣体 NAS 前言 大家好,我是星...
星哥带你玩飞牛NAS-5:飞牛NAS中的Docker功能介绍

星哥带你玩飞牛NAS-5:飞牛NAS中的Docker功能介绍

星哥带你玩飞牛 NAS-5:飞牛 NAS 中的 Docker 功能介绍 大家好,我是星哥,今天给大家带来如何在...
星哥带你玩飞牛 NAS-10:备份微信聊天记录、数据到你的NAS中!

星哥带你玩飞牛 NAS-10:备份微信聊天记录、数据到你的NAS中!

星哥带你玩飞牛 NAS-10:备份微信聊天记录、数据到你的 NAS 中! 大家对「数据安全感」的需求越来越高 ...
国产开源公众号AI知识库 Agent:突破未认证号限制,一键搞定自动回复,重构运营效率

国产开源公众号AI知识库 Agent:突破未认证号限制,一键搞定自动回复,重构运营效率

国产开源公众号 AI 知识库 Agent:突破未认证号限制,一键搞定自动回复,重构运营效率 大家好,我是星哥,...
Prometheus:监控系统的部署与指标收集

Prometheus:监控系统的部署与指标收集

Prometheus:监控系统的部署与指标收集 在云原生体系中,Prometheus 已成为最主流的监控与报警...