Linux64位1T内存hugepage,orion的简单测试

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

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值