如何使用Oracle ORION(Linux磁碟基準測試)這是使用Oracle Corporation提供的磁碟IO性能基準測試工具“ORION”在Linux環境下測量磁碟I / O性能時的一個操作說明。
“ORION”是基於Oracle資料庫的IO控製程序建立的,它是通過模擬RDBMS的各種工作負載模式來衡量磁碟IO性能的優秀基準測試軟體。 提供Windows版本,Linux版本,Solaris版本,AIX版本,HP-UX版本,可用於比較不同平台之間的磁碟IO性能。
動作確認環境
  • CentOS 6.2 (2.6.32-220.el6.x86_64 #1 SMP)
    Filesystem : ext4
  • CentOS 5.8 (2.6.18-308.el5 #1 SMP)
    Filesystem : ext3
  • Oracle ORION 11.1.0.7.0
ORION下載URL
請從下面的URL下載與執行環境對應的ORION for Linux。 下載時,需要使用Oracle Web帳戶登錄。 在這裡,我們將描述使用64位版本的“Linux(x86-64)”的過程。 還提供手冊(英文),因此最好同時下載想要查看詳細訊息的人員。

ORION INSTALL

INSTALL
下載的檔案用GZIP壓縮並解壓縮。 解壓縮後,給“orion_linux _ x86 - 64”檔案執行權限。
$ gunzip orion_linux_x86-64.gz
$ chmod 755 orion_linux_x86-64
雖然它經常被誤解,但ORION是獨立運行的,因此您不需要安裝Oracle資料庫或Oracle客戶端。

安裝後操作

 

執行ORION並確認顯示以下消息。

 

$ ./orion_linux_x86-64
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
Parse error: View help screen using ./orion_linux_x86-64 -help.

ORION 執行準備

建立測量目錄/測量檔案
在測量磁碟IO性能的分區上建立測量目錄和度量檔案。 為了進行精確的測量,最好確保測量檔案的總大小不能位於在OS等檔案高速快取上的空間。 如果可能,建議使用與Oracle資料資料檔案等效的檔案容量/配置來建立它。
在這裡,作為例子,在“/ oradata / orion-test”目錄下建立“10GB * 10個檔案”的測量檔案
$ mkdir /oradata/orion-test
$
$ dd if=/dev/zero of=/oradata/orion-test/testfile-010.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-020.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-030.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-040.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-050.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-060.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-070.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-080.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-090.dbf bs=1M count=10240
$ dd if=/dev/zero of=/oradata/orion-test/testfile-100.dbf bs=1M count=10240
建立一個LUN檔案
在放置ORION的目錄下建立一個“orion-test.lun”檔案。 請在此檔案中包含一組測量檔案,如下所示。 這完成了ORION執行的準備。
$ vi orion-test.lun
/oradata/orion-test/testfile-010.dbf
/oradata/orion-test/testfile-020.dbf
/oradata/orion-test/testfile-030.dbf
/oradata/orion-test/testfile-040.dbf
/oradata/orion-test/testfile-050.dbf
/oradata/orion-test/testfile-060.dbf
/oradata/orion-test/testfile-070.dbf
/oradata/orion-test/testfile-080.dbf
/oradata/orion-test/testfile-090.dbf
/oradata/orion-test/testfile-100.dbf

ORION執行(磁碟IO性能的度量)

simple MODE
在簡單模式下執行ORION。 在簡單模式下,磁碟IO性能僅通過讀取磁碟(讀取)來模擬工作負載。
“-num_disks”選項允許您控制負載的提升量。 當目標磁碟數量很大時,在測量SSD等高目標IO性能的區域時,請增加“-num_disks”的值。 如果使用以下參數執行ORION,則執行時間約為9分鐘。 請注意,執行期間,1個CPU的利用率會達到100%。
$ ./orion_linux_x86-64 -run simple -testname orion-test -num_disks 1
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
orion-test_yyyymmdd_hhmm
Test will take approximately 9 minutes
Larger caches may take longer
執行結束後,建立下一個測量結果檔案(5個檔案)。 請首先參考摘要檔案並查看測量結果摘要。
  • orion-test_yyyymmdd_hhmm_iops.csv
  • orion-test_yyyymmdd_hhmm_lat.csv
  • orion-test_yyyymmdd_hhmm_mbps.csv
  • orion-test_yyyymmdd_hhmm_summary.txt
  • orion-test_yyyymmdd_hhmm_trace.txt
在只讀執行的簡單模式下,可能會在測量結果中記錄異常值。 與不進行簡單模式的測定結果的飲用混合進行高級模式下的寫入的情況相比,可以確認測定結果的有效性。 在簡單模式下出現極值的環境下,將簡單模式設置為ORION操作確認的程度會更好。
advanced MODE
在高級模式下執行ORION。 在高級模式下,通過使用執行選項指定參數,可以通過模擬RDBMS的各種工作負載模式來衡量磁碟IO性能。
在這裡,作為例子,我們將其設置為“磁碟寫入(寫入)處理的百分比是20%”。
$ ./orion_linux_x86-64 -run advanced -testname orion-test -write 20 -num_disks 1
 

如何查看ORION執行結果

summary FILE
ORION的負載測試完成後,將下面的執行結果輸出到摘要檔案中。
從該執行結果可以看出,對於測量期間指定的待測量的磁碟設備指定的工作量,可以證明“最大78.12MB /秒”,“最大204IOPS”,“最小5.02毫秒”的磁碟IO性能。
  • 最大 Large MBPS:最大資料傳輸頻寬(MB /秒)
  • 最大 Small IOPS:IO的最大數量(IOPS)
  • 最小 Small 延遲:最小響應延遲時間(毫秒)
通過查看輸出到摘要檔案的值來查看測量結果的摘要後,確認每個mbps·iops·lat檔案的詳細測量結果。
ORION VERSION 11.1.0.7.0
Commandline:
-run advanced -testname orion-test -write 20
This maps to this test:
Test: orion-test
Small IO size: 8 KB
Large IO size: 1024 KB
IO Types: Small Random IOs, Large Random IOs
Simulated Array Type: CONCAT
Write: 20%
Cache Size: Not Entered
Duration for each Data Point: 60 seconds
Small Columns:, 0
Large Columns:, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
Total Data Points: 47
Name: /oradata/orion-test/testfile-010.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-020.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-030.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-040.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-050.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-060.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-070.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-080.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-090.dbf    Size: 10737418240
Name: /oradata/orion-test/testfile-100.dbf    Size: 10737418240
10 FILEs found.
Maximum Large MBPS=78.12 @ Small=0 and Large=17
Maximum Small IOPS=204 @ Small=10 and Large=0
Minimum Small Latency=5.02 @ Small=1 and Large=0
mbps file
在mbps檔案中,記錄“Large IO”處的資料傳輸頻寬(MB /秒)。
您可以看到ORION正在測量,同時逐漸增加“大IO”的負載水平。 在這個執行結果中,執行到“20”的測量。 如果加載似乎不掛起,請嘗試增加“ - num_disks”選項指定的值。
Large/Small, 0, 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50
1, 67.84
2, 72.45
3, 74.95
4, 72.53
5, 75.69
6, 74.65
7, 77.55
8, 76.02
9, 75.05
10, 76.24
11, 77.05
12, 77.94
13, 75.23
14, 78.11
15, 78.02
16, 77.21
17, 78.12
18, 77.57
19, 78.03
20, 76.32
iops file
在iops檔案中,記錄“Small IO”處的IO計數(IOPS)。
您可以看到ORION正在逐步增加“Small IO”的負載水平。 在這個執行結果中,執行到“50”的測量。
Large/Small, 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50
0, 199, 197, 201, 201, 198, 204, 200, 197, 201, 199, 196, 198, 196, 198, 196, 200, 199, 200, 201, 200, 197, 197, 201, 197, 197, 197
1
2
(以下、略)
lat file
在lat檔案中記錄“Small IO”的響應延遲時間(毫秒)。
Large/Small, 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50
0, 5.02, 10.12, 19.88, 29.78, 40.37, 48.94, 59.97, 70.71, 79.26, 90.32, 101.51, 110.66, 121.99, 131.30, 142.46, 149.70, 160.18, 169.88, 179.00, 189.30, 202.47, 213.14, 218.07, 233.39, 242.60, 252.56
1
2
(以下、略)
 

------------------

ORION的各種用法

指定負載級別並僅測量“Small IO”(-num_small選項)
當您希望關注IOPS性能和“Small IO”的響應延遲時間(毫秒)時,“ - num_small”選項非常有用。 在本例中,僅指定“Small IO”的工作量,逐漸增加負載水平,測量負載水平“1至20”。
$ ./orion_linux_x86-64 -run advanced -testname orion-test -write 20 -matrix max -num_small 20 -num_large 0
指定“Small IO”的I / O大小並測量(-size_small選項)
“小IO尺寸”的預設值是“8 KB”。 這是Oracle資料庫的I / O請求大小的預設值,即使在執行ORION時,在很多情況下也不需要更改“小IO大小”。
如果您有特殊要求並更改“小IO尺寸”和度量,請使用“--size_small”選項(單位:KB)。 在這個例子中,“小IO尺寸”被指定為“4 KB”並且執行測量。
$ ./orion_linux_x86-64 -run advanced -testname orion-test -write 20 -matrix max -num_small 20 -num_large 0 -size_small 4
指定負載級別並僅測量“Large IO”(-num_large選項)
當您想要關注“大型IO”中的資料傳輸頻寬(MB /秒)時,“ - num_large”選項非常有用。 在本例中,僅指定“大IO”的工作負載,逐漸增加負載級別時測量負載級別“1至10”。
$ ./orion_linux_x86-64 -run advanced -testname orion-test -write 20 -matrix max -num_small 0 -num_large 10
ORION 執行option一覽
$ ./orion_linux_x86-64 -help
ORION: ORacle IO Numbers -- Version 11.1.0.7.0
ORION runs IO performance tests that model Oracle 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
mix of small and large IO loads sustained for a duration. Anywhere
from a single data point to a two-dimensional array of data points can
be tested by setting the right options.
An Orion test consists of data points at various small and large IO
load levels. These points can be represented as a two-dimensional
matrix: Each column in the matrix represents a fixed small IO load.
Each row represents a fixed large IO load. The first row is with no
large IO load and the first column is with no small IO load. An Orion
test can be a single point, a row, a column or the whole matrix.
The 'run' parameter is the only mandatory parameter. Defaults
are indicated for all other parameters. For additional information on
the user interface, see the Orion User Guide.
is a filename prefix. By default, it is "orion". It can be
specified with the 'testname' parameter.
.lun should contain a carriage-return-separated list of LUNs
The output files for a test run are prefixed by _ where
date is "yyyymmdd_hhmm".
The output files are:
__summary.txt - Summary of the input parameters along with
                 min. small latency, max large MBPS
                 and/or max. small IOPS.
__mbps.csv - Performance results of large IOs in MBPS
__iops.csv - Performance results of small IOs in IOPS
__lat.csv - Latency of small IOs
__tradeoff.csv - Shows large MBPS / small IOPS
                 combinations that can be achieved at
                 certain small latencies
_trace.txt - Extended, unprocessed output
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, dss, oltp)
            simple - tests random 8K small IOs at various loads,
                 then random 1M large IOs at various loads.
            normal - tests combinations of random 8K small
                 IOs and random 1M large IOs
            advanced - run the workload specified by the user
                 using optional parameters
            dss - run with random 1M large IOs at increasing loads
                to determine the maximum throughput
            oltp - run with random 8K small IOs at increasing loads
                to determine the maximum IOPS
Optional parameters:
testname        Name of the test run
num_disks            Number of disks (physical spindles). Default is
            the number of LUNs in .lun
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 large IOs
             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 volume formed by combining the
            provided volumes in one of these ways (default concat):
             concat - A serial concatenation of the volumes
             raid0 - A RAID-0 mapping across the volumes
write            Percentage of writes (SEE WARNING ABOVE) - default 0
cache_size        Size *IN MEGABYTES* of the array's cache.
            Unless this option is set to 0, Orion does a number
            of (unmeasured) random IO before each large sequential
            data point. This is done in order to fill up the array
            cache with random data. This way, the blocks from one
            data point do not result in cache hits for the next
            data point. Read tests are preceded with junk reads
            and write tests are preceded with junk writes. If
            specified, this 'cache warming' is done until
            cache_size worth of IO has been read or written.
            Default behavior: fill up cache for 2 minutes before
            each data point.
duration        Duration of each data point (in seconds) - default 60
num_small        Number of outstanding small IOs (only if matrix is
            point, col, or max) - no default
num_large        For random, number of outstanding large IOs.
            For sequential, number of streams (only if matrix is
            point, row, or max) - no default
matrix            An Orion test consists of data points at various small
            and large IO load levels. These points can be
            represented as a two-dimensional matrix: Each column
            in the matrix represents a fixed small IO load. Each
            row represents a fixed large IO load. The first row
            is with no large IO load and the first column is with
            no small IO load. An Orion test can be a single point,
            a row, a column or the whole matrix, depending on the
            matrix option setting below (default basic):
             basic - test the first row and the first column
             detailed - test the entire matrix
             point - test at load level num_small, num_large
             col - varying large IO load with num_small small IOs
             row - varying small IO load with num_large large IOs
             max - test varying loads up to num_small, num_large
verbose            Prints tracing information to standard output if set.
            Default -- not set
Examples
For a preliminary set of data
    -run simple
For a basic set of data
    -run normal
To evaluate storage for an OLTP database
    -run oltp
To evaluate storage for a data warehouse
    -run dss
To generate combinations of 32KB and 1MB reads to random locations:
    -run advanced
    -size_small 32 -size_large 1024 -type rand    -matrix detailed
To generate multiple sequential 1MB write streams, simulating 1MB RAID0 stripes
    -run advanced
    -simulate RAID0 -stripe 1024 -write 100 -type seq
    -matrix col -num_small 0

 

客戶需要的測試方式,使用OLTP參數

開始壓測,執行
./orion_linux_x86-64 -run oltp -testname mytest -num_disks 1 -write 10 -duration 30

小兵 發表在 痞客邦 留言(0) 人氣()