一. ORION 概述1.1 ORION 說明
ORION (Oracle I/O Calibration Tool) 是校準用於 Oracle 資料庫的儲存系統 I/O 效能的獨立工具。校準結果對於瞭解儲存系統的效能有很大協助,不僅可以找出影響 Oracle 資料庫效能的問題,還能測量新資料庫安裝的大小。由於 ORION 是一個獨立工具,使用者不需要建立和運行 Oracle 資料庫。
Orion的為:
http://www.oracle.com/technology/global/cn/software/tech/orion/index.html
為了儘可能地類比 Oracle 資料庫,ORION 使用和 Oracle 相同的 I/O 軟體集產生一個合成的 I/O 負載。可以將 ORION 配置為產生很多 I/O 負載,包括一個類比 OLTP 和資料倉儲負載的 I/O 負載。
ORION 支援多種平台。將來還會增加對更多平台的支援。使用者指南提供詳細的使用文檔,包括“入門”部分和疑難解答提示。在 ORION 中調用“-help”選項可以直接擷取關於如何使用 ORION 的摘要。
注意,Oracle 不對 ORION提供支援。
優勢:
1、不需要運行load runner以及配置大量的clinet
2、不需要運行oracle資料庫,以及準備大量的測試資料
3、測試結果更具有代表性,如隨機IO測試中,該軟體可以讓儲存的命中率接近為0,而更模擬出了磁碟的真實的IOPS,而load runner很難做到這些,最終的磁碟IOPS需要換算得到。
4、可以根據需要定製一定比例的寫操作(預設沒有寫操作),但是需要注意,如果磁碟上有資料,需要小心資料被覆蓋掉。
缺點
1、到現在為止,無法指定自訂的總體的已耗用時間以及加壓的幅度,這裡完全是自動的.
2、無法進行一些自訂的操作類型,如表的掃描操作,裝載測試等等,不過可以與oracle資料庫結合起來達到這個效果.
1.2 ORION 協助
C:\Program Files(x86)\Oracle\Orion>orion -help
ORION: ORacle IO Numbers -- Version10.2.0.1.0
ORION runs IO performance tests that modelOracle RDBMS IO workloads.
It measures the performance of small(2-32K) IOs and large (128K+) IOs at various load levels. Each Orion data point is done at a specific mixof small and large IO loads sustained for a duration. Anywhere from a single data point to atwo-dimensional array of data points can be tested by setting the rightoptions.
An Orion test consists of data points atvarious small and large IO load levels. These points can be represented as a two-dimensional matrix: Each columnin the matrix represents a fixed small IO load. Each row represents a fixedlarge IO load. The first row is with no largeIO load and the first column is with no small IO load. An Orion test can be a single point, a row, acolumn or the whole matrix.
Parameters 'run','testname', and 'num_disks' are mandatory. Defaults are indicated for all otherparameters. For additional information on the user interface, see the Orion User Guide.
--運行ORAION必須包含run,testname,num_disks 三個參數。
<testname>.lun should contain acarriage-return-separated list of LUNs The output files for a test run areprefixed by <testname>_.
The output files are:
<testname>_summary.txt - Summary ofthe input parameters along with min. small latency, max large MBPS and/or max.small IOPS.
<testname>_mbps.csv - Performanceresults of large IOs in MBPS(輸送量)
<testname>_iops.csv - Performanceresults of small IOs in IOPS(每秒IO次數)
<testname>_lat.csv - Latency of smallIOs(回應時間)
<testname>_tradeoff.csv - Shows largeMBPS / small IOPS combinations that can be achieved at certain small latencies
<testname>_trace.txt - Extended,unprocessed output(跟蹤資訊,最詳細的資料)
--ORION 執行結束會輸出5個檔案,每個檔案的不同作用參考上面的說明。
WARNING: IF YOU ARE PERFORMING WRITE TESTS,BE PREPARED TO LOSE ANY DATA STORED ON THE LUNS.
Mandatory parameters(強制的參數說明):
run Type of workload to run(simple, normal, advanced)
simple - tests random 8K small IOs at various loads,then random 1M largeIOs at various loads.
normal - tests combinations of random8K small IOs and random 1M large IOs
advanced - run theworkload specified by the user using optional parameters
testname Name of the test run
num_disks Number of disks (physicalspindles)
Optional parameters(可選的參數說明,注意預設值):
size_small Size of small IOs (in KB) -default 8
size_large Size of large IOs (in KB) -default 1024
type Type of large IOs (rand,seq) - default rand
rand - Random largeIOs
seq - Sequential streams of large IOs
num_streamIO Number of concurrent IOs per stream(only if type is seq) - default 4
simulate Orion tests on a virtual volumeformed by combining the provided volumes in one of these ways (default concat):
concat - A serialconcatenation of the volumes
raid0 - A RAID-0mapping across the volumes
write Percentage of writes (SEEWARNING ABOVE) - default 0
cache_size Size *IN MEGABYTES* of thearray's cache.
Unless this option is set to 0, Orion does anumber of (unmeasured) random IO before each large sequential data point. This is done in order to fill up the array cachewith random data. This way, the blocksfrom one data point do not result in cache hits for the next data point. Read tests are preceded with junk reads andwrite tests are preceded with junk writes. If specified, this 'cache warming' is done until cache_size worth of IOhas been read or written.
Default behavior: fillup cache for 2 minutes before each data point.
duration Duration of each data point (inseconds) - default 60
num_small Number of outstanding small IOs(only if matrix is point, col, or max) - no default
num_large For random, number ofoutstanding large IOs.
For sequential, numberof streams (only if matrix is point, row, or max) - nodefault
matrix An Orion test consists ofdata points at various small and large IO load levels. These points can be represented as atwo-dimensional matrix: Each column in the matrix represents a fixed small IOload. Each row represents a fixed largeIO load. The first row is with no largeIO load and the first column is with no small IO load. An Orion test can be a single point, a row, acolumn or the whole matrix, depending on the matrix option setting below (default basic):
basic - test thefirst row and the first column
detailed - test theentire matrix
point - test at loadlevel num_small, num_large
col - varying largeIO load with num_small small IOs
row - varying smallIO load with num_large large IOs
max - test varyingloads up to num_small, num_large
verbose Prints tracing information tostandard output if set.
Default -- not set
Examples
For a preliminary set of data
-run simple -testname <name> -num_disks <#>
For a basic set of data
-run normal -testname <name> -num_disks <#>
To generate combinations of 32KB and 1MBreads to random locations:
-run advanced -testname <name> -num_disks <#>
-size_small 32 -size_large 1024 -type rand -matrix detailed
To generate multiple sequential 1MB writestreams, simulating 1MB RAID0 stripes
-run advanced -testname <name> -num_disks <#>
-simulate RAID0 -stripe 1024 -write 100 -type seq
-matrix col -num_small 0
C:\Program Files (x86)\Oracle\Orion>
二.Windows 下使用方法
2.1 在Orion的安裝目錄下建立dave.lun檔案,在裡面添加要測試的分區,比如:
\\.\D:
這裡我們要對D盤進行測試。
2.2 執行orion命令。
Orion有三個不同的等級,simple,normal,advance. 這個根據自己的需求來進行設定。 如:
C:\Program Files(x86)\Oracle\Orion>orion -runsimple -testname dave -num_disks 1
--注意這裡的testname 參數,只需要寫檔案名稱就可以了,orion 會自動補上副檔名,如果寫上副檔名,反而會報錯
ORION: ORacle IONumbers -- Version 10.2.0.1.0
Test will takeapproximately 9 minutes
Larger cachesmay take longer
這裡的testname 寫我們之前配置的lun檔案的名稱, num_disks 是磁碟的數量。
2.3 查看結果
在orion的安裝目錄下,會產生幾個檔案:dave_iops.csv;dave_lat.csv;dave_mbps.csv; dave_summary.txt 和dave_trace.txt 檔案。 我們可以看一下summary的內容。
ORION VERSION10.2.0.1.0
Commandline:
-run simple-testname dave -num_disks 1
This maps tothis test:
Test: dave
Small IO size: 8KB
Large IO size:1024 KB
IO Types: SmallRandom IOs, Large Random IOs
Simulated ArrayType: CONCAT
Write: 0%
Cache Size: NotEntered
Duration foreach Data Point: 60 seconds
SmallColumns:, 0
LargeColumns:, 0, 1, 2
Total DataPoints: 8
Name: \\.\D: Size: 1784847360
1 FILEs found.
Maximum LargeMBPS=32.83 @ Small=0 and Large=1
Maximum SmallIOPS=74 @ Small=2 and Large=0
Minimum SmallLatency=13.53 @ Small=1 and Large=0
因為其測試結果是csv檔案,所以可以很方便的根據結果在excle中繪製壓力曲線。
三.Linux 下使用方法
3.1 解壓縮ORION
用root使用者解壓軟體:
unzip orion_linux_x86-64.gz
解壓完成後,產生ORION軟體:orion_linux_x86-64
3.2 配置dave.lun 檔案。如:
/dev/sdc1
/dev/sdd1
/dev/sde1
/dev/sdf1
3.3 執行orion命令:
orion_linux_x86-64 -run simple -testname dave -num_disks 4
--注意這裡的testname 參數,只需要寫檔案名稱就可以了,orion 會自動補上副檔名,如果寫上副檔名,反而會報錯
3.4 查看結果
四.其他的幾個測試命令樣本
4.1、資料庫OLTP類型,假定IO類型全部是8K隨機操作,壓力類型,自動加壓,從小到大,一直到儲存壓力極限
#./orion -run advanced -testname dave-num_disks 1 -size_small 8 -size_large 8 -type rand &
4.2、資料庫輸送量測試,假定IO全部是1M的序列性IO
#./orion -run advanced -testname mytest-num_disks 96 -size_small 1024 -size_large 1024 -type seq &
4.3、指定特定的IO類型與IO壓力,如指定小IO為壓力500的時候,不同大IO下的壓力情況
#./orion -run advanced -testname mytest-num_disks 96 -size_small 8 -size_large 128 -matrix col -num_small 500 -typerand &
4.4、結合不同的IO類型,測試壓力矩陣
#./orion -run advanced -testname mytest-num_disks 96 -size_small 8 -size_large 128 -matrix detailed -type rand &
-------------------------------------------------------------------------------------------------------
著作權,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!
Blog: http://blog.csdn.net/tianlesoftware
Weibo: http://weibo.com/tianlesoftware
Email: tianlesoftware@gmail.com
Skype: tianlesoftware
-------加群需要在備忘說明Oracle資料表空間和資料檔案的關係,否則拒絕申請----
DBA1 群:62697716(滿); DBA2 群:62697977(滿) DBA3 群:62697850(滿)
DBA 超級群:63306533(滿); DBA4 群:83829929(滿) DBA5群: 142216823(滿)
DBA6 群:158654907(滿) DBA7 群:69087192(滿) DBA8 群:172855474
DBA 超級群2:151508914 DBA9群:102954821 聊天 群:40132017(滿)