/*
|| Oracle 11gR2: I/O Performance Tuning Series, Listing 3
||
|| Contains examples of parameter files and output from ORION (Oracle Input/Output
|| Numbers) test runs, including: 
|| -- Test invocation scripts
|| -- Summary and trace files from test invocations
|| -- Resulting .CSV files that describe MBPS, IOPS, and latency
|| -- Sample charts generated from .CSV output using Microsoft Excel 7.0
|| to demonstrate its effectiveness in simulating extra-database I/O generation 
|| for performance tuning of I/O subsystems.
||
|| Author: Jim Czuprynski
||
|| WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
|| These examples are provided to demonstrate various ORION I/O performance
|| tuning concepts and features. ORION performs destructive tests against its I/O 
|| targets, so these scripts – and the targets of any ORION test – should be carefully
|| reviewed and understood before being executed against any Oracle database platform
|| to avoid potential damage!
|| WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
*/


/* 
|| Listing 3.1:
|| Edited results of fdisk –l command generated within VM. Note that only the devices 
|| selected for ORION I/O performance testing are shown.
*/

[root@11gR2Base ~]# fdisk -l
. . .

Disk /dev/sdi: 257.6 GB, 257698037760 bytes
255 heads, 63 sectors/track, 31330 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1               1        1246    10008463+   5  Extended
/dev/sdi2            1247        2492    10008495   83  Linux
/dev/sdi5               1         250     2008062   83  Linux
/dev/sdi6             251         500     2008093+  83  Linux
/dev/sdi7             501         750     2008093+  83  Linux
/dev/sdi8             751        1000     2008093+  83  Linux
/dev/sdi9            1001        1246     1975963+  83  Linux

Disk /dev/sdj: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdj1               1        1305    10482381   83  Linux

Disk /dev/sdk: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdk1               1        1305    10482381   83  Linux

Disk /dev/sdl: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdl1               1        1305    10482381   83  Linux

Disk /dev/sdm: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdm1               1        2610    20964793+  83  Linux

/* 
|| Listing 3.2:
|| Setting up ORION I/O test generation targets (via *.lun files)
*/

# HDD_3Drives1LVM.lun:

/dev/mapper/vg1-lvfra

# HDD_3Drives1Device.lun:

/dev/sdk1
/dev/sdl1
/dev/sdm1

# SDD_1Drive1Device.lun:

/dev/sdj1

# HDD_5Drives2Devices.lun:

/dev/sdi8
/dev/sdi9
/dev/sdk1
/dev/sdl1
/dev/sdm1

# XDD_6Drives3Devices.lun:

/dev/sdi8
/dev/sdi9
/dev/sdj1
/dev/sdk1
/dev/sdl1
/dev/sdm1

/* 
|| Listing 3.3:
|| Invoking ORION I/O test generation scripts (note highlighted significant differences)
*/

#####
# Test 3.1:
# Invoke a simple I/O test against a single HDD mount point (really, an LVM)
#####
/home/oracle/orion_x86_64 -run simple -testname HDD_3Drives1LVM

#####
# Test 3.2:
# Invoke an advanced I/O test against a single SSD mount point
# Total number of disks assumed: 1
# RAID simulated: RAID-0
# Stripe size: 1024 KB
# Read/Write Ratio: 10/90
#####
/home/oracle/orion_x86_64 -run advanced -testname SSD_1Drive1Device -num_disks 1 \ 
                          -simulate raid0 -stripe 1024 -write 90 -duration 20

#####
# Test 3.3:
# Invoke an advanced I/O test against three separate HDD mount points
# Total number of disks assumed: 3
# RAID simulated: RAID-0
# Stripe size: 1024 KB
# Read/Write Ratio: 90/10
#####
/home/oracle/orion_x86_64 -run advanced -testname HDD_3Drives1Device -num_disks 3 \
                          -simulate raid0 -stripe 1024 -write 10 -duration 20

#####
# Test 3.4:
# Invoke an advanced I/O test against five separate HDD mount points
# on two different physical devices
# Total number of disks assumed: 5
# RAID simulated: RAID-0
# Stripe size: 1024 KB
# Read/Write Ratio: 80/20
#####
/home/oracle/orion_x86_64 -run advanced -testname HDD_5Drives2Devices -num_disks 5 \
                          -simulate raid0 -stripe 1024 -write 20 -duration 20

#####
# Test 3.5:
# Invoke an advanced I/O test against six separate HDD mount points 
# plus one SSD mount point (i.e. three different physical devices)
# Total number of disks assumed: 6
# RAID simulated: RAID-0
# Stripe size: 1024 KB
# Read/Write Ratio: 70/30
# Note that cache “warm-up” operations have been deactivated.
#####
/home/oracle/orion_x86_64 -run advanced -testname XDD_6Drives3Devices -num_disks 6 \ 
                          -simulate raid0 -stripe 1024 -type seq -size_small 128 \
                          -size_large 1024 -write 30 -duration 20 -cache_size 0