新聞中心
如何進(jìn)行orion的簡(jiǎn)單測(cè)試,針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。
策勒網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)!從網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開(kāi)發(fā)、APP開(kāi)發(fā)、響應(yīng)式網(wǎng)站開(kāi)發(fā)等網(wǎng)站項(xiàng)目制作,到程序開(kāi)發(fā),運(yùn)營(yíng)維護(hù)。創(chuàng)新互聯(lián)于2013年開(kāi)始到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來(lái)保證我們的工作的順利進(jìn)行。專(zhuān)注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)。
orion是一個(gè)做IO測(cè)試的小巧工具,可以測(cè)試隨機(jī)讀寫(xiě),模擬混合負(fù)載等。
在oracle 11g已經(jīng)自帶包含了這一工具,無(wú)須額外的安裝了,為IO方面的測(cè)試帶來(lái)了不少的便利。
當(dāng)然如此簡(jiǎn)單的小工具我在使用時(shí)還是碰到了些小問(wèn)題。簡(jiǎn)單總結(jié)一下。
首先是使用orion,直接提示依賴(lài)鏈接庫(kù)的問(wèn)題
[oracle@db117 bin]$ orion
orion: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
因?yàn)檫@個(gè)數(shù)據(jù)庫(kù)是新安裝的,所以感覺(jué)是不是克隆安裝沒(méi)初始化好,但是發(fā)現(xiàn)還是和變量LD_LIBRARY_PATH有關(guān)。
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/lib:/usr/X11R6/lib:/usr/local/lib
添加環(huán)境變量,就馬上可以了。
[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小的小工具。
我們測(cè)試的環(huán)境如下,使用的是機(jī)械硬盤(pán)。
[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的時(shí)候,需要定義一個(gè)文件,以.lun結(jié)尾。比如iotest.lun
我們要測(cè)試的設(shè)備為/dev/sda6,在iotest.lun里面就寫(xiě)這個(gè)設(shè)備即可。
可以使用下面的方式來(lái)嘗試啟用 testname對(duì)應(yīng)的參數(shù)值就是iotest
orion -run oltp -testname iotest
當(dāng)然這個(gè)命令使用還是有一些小技巧的,比如直接啟用,會(huì)有下面的錯(cuò)誤。
[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
當(dāng)然提示信息已經(jīng)很明顯了,當(dāng)前環(huán)境沒(méi)有配置大頁(yè),所以還是需要配置大頁(yè)或者聲明不需要大頁(yè)。
可以使用hugenotneeded來(lái)聲明,當(dāng)然還是有一些小問(wèn)題。
[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.
這個(gè)命令要求使用完整路徑,不要用相對(duì)路徑,修改為完整路徑繼續(xù)測(cè)試。
[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.
這個(gè)時(shí)候提示是權(quán)限不足,原來(lái)使用的oracle用戶(hù)沒(méi)有更高的權(quán)限來(lái)操作/dev/sda6,所以可以調(diào)整權(quán)限或者直接使用root來(lái)運(yùn)行。
使用dd命令來(lái)測(cè)試/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
當(dāng)然把oracle用戶(hù)下的.bash_profile中的環(huán)境變量初始化到root用戶(hù)下,即可使用orion
如果想簡(jiǎn)單一試,可以使用下面的命令,生成的測(cè)試時(shí)間是不能改動(dòng)的。簡(jiǎn)單等待之后,輸出的簡(jiǎn)單報(bào)告如下
[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
當(dāng)然還可以使用oltp的選項(xiàng)來(lái)測(cè)試
/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
或者測(cè)試8k的隨機(jī)讀寫(xiě)
/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
關(guān)于如何進(jìn)行orion的簡(jiǎn)單測(cè)試問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開(kāi),可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識(shí)。
網(wǎng)頁(yè)標(biāo)題:如何進(jìn)行orion的簡(jiǎn)單測(cè)試
URL鏈接:http://fisionsoft.com.cn/article/ggpjch.html