oracle io topics

Upload: tradewolf

Post on 15-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Oracle IO Topics

    1/64

    Oracle I/O TopicsOracle I/O Topics

    Oracle and StorageOracle and Storage

  • 8/8/2019 Oracle IO Topics

    2/64

    Objectives for this unitObjectives for this unitAt the end of this module the student will understand theAt the end of this module the student will understand the

    following tasks and concepts.following tasks and concepts. Understand how a disk drive worksUnderstand how a disk drive works

    Understand disk drive performanceUnderstand disk drive performance

    Understand RAIDUnderstand RAID

    Understand disk controllersUnderstand disk controllers Understand disk configuration optionsUnderstand disk configuration options

    Understand the read and write mechanisms of the SANUnderstand the read and write mechanisms of the SANsystemsystem

    Understand the read and write mechanisms of OracleUnderstand the read and write mechanisms of Oracle

    Understand how these mechanisms affect performanceUnderstand how these mechanisms affect performance

  • 8/8/2019 Oracle IO Topics

    3/64

    Physical Parts in a DiskPhysical Parts in a DiskDriveDrive

    Disk Platters tracks and sectorsDisk Platters tracks and sectors Disk Heads read/write heads thatDisk Heads read/write heads that

    perform reads and writes to theperform reads and writes to thetracks on the platterstracks on the platters

  • 8/8/2019 Oracle IO Topics

    4/64

    Disk Drive ComponentsDisk Drive Components

    Disk

    Platter

  • 8/8/2019 Oracle IO Topics

    5/64

    Disk Drive ComponentsDisk Drive Components

    Disk

    Platter

    Track

  • 8/8/2019 Oracle IO Topics

    6/64

    Disk Drive ComponentsDisk Drive Components

    Disk

    Platter

    Track

    Sector

  • 8/8/2019 Oracle IO Topics

    7/64

    Disk Drive ComponentsDisk Drive Components

    DiskPlatter

    Track

    Sector

    Armature

    Head

  • 8/8/2019 Oracle IO Topics

    8/64

    Disk Drive ComponentsDisk Drive Components

    Cylinder

  • 8/8/2019 Oracle IO Topics

    9/64

    How a Disk WorksHow a Disk Works

    RPM disks spin at a given RPM, suchRPM disks spin at a given RPM, suchas 15,000 rpmas 15,000 rpm

    Seek Time the time it takes for theSeek Time the time it takes for the

    head to move to the trackhead to move to the track Rotational Latency the time it takesRotational Latency the time it takes

    for the disk to rotate (spin) to thefor the disk to rotate (spin) to thesector where the needed data issector where the needed data is

  • 8/8/2019 Oracle IO Topics

    10/64

    Disk Drive Seek andDisk Drive Seek andRotationRotation

  • 8/8/2019 Oracle IO Topics

    11/64

    Disk Drive Seek and RotationDisk Drive Seek and Rotation

    Step 1: Seek to the DesiredStep 1: Seek to the DesiredTrackTrackTime = Seek TimeTime = Seek Time

  • 8/8/2019 Oracle IO Topics

    12/64

    Disk Drive Seek and RotationDisk Drive Seek and Rotation

    Step 2: Wait for Sector toStep 2: Wait for Sector toRotateRotate

    Time = Rotational LatencyTime = Rotational Latency

  • 8/8/2019 Oracle IO Topics

    13/64

    Disk PerformanceDisk PerformanceSpecificationsSpecifications Typical 18 Gbyte SCSI-3Typical 18 Gbyte SCSI-3

    Rotational Speed - 15,000 RPMRotational Speed - 15,000 RPM

    Avg. Seek for random I/Os 3.9 msAvg. Seek for random I/Os 3.9 ms

    read, 4.5ms writeread, 4.5ms write Transfer Rate 40MB/secTransfer Rate 40MB/sec

    Track to Track Seek for sequential I/OsTrack to Track Seek for sequential I/Os0.5ms read, 0.7 ms write0.5ms read, 0.7 ms write

    Rotational Latency - 2.0 msRotational Latency - 2.0 ms

  • 8/8/2019 Oracle IO Topics

    14/64

    Calculating Max RandomCalculating Max RandomSeeks/SecSeeks/Sec Maximum Random Seeks / secMaximum Random Seeks / sec

    max random seeks/sec = 1 / (sec per seek)max random seeks/sec = 1 / (sec per seek)

    sec per seek = (3.9ms+2.0ms)(1sec/1000ms)sec per seek = (3.9ms+2.0ms)(1sec/1000ms)

    1 / 0.0059 (sec/seek) = 169.5 Seeks/sec1 / 0.0059 (sec/seek) = 169.5 Seeks/sec

    What about queuing?What about queuing?

  • 8/8/2019 Oracle IO Topics

    15/64

    I/O Request QueuingI/O Request QueuingGraphGraph

    QUEUE LENGTH VS. UTILIZATION

    0.000

    2.000

    4.000

    6.000

    8.000

    10.000

    12.000

    14.000

    16.000

    18.000

    20.000

    5% 10% 15% 20% 25% 30% 35% 40% 45% 50% 55% 60% 65% 70% 75% 80% 85% 90% 95%

    UTILIZATION

    QUEUELEN

    GT

  • 8/8/2019 Oracle IO Topics

    16/64

    Maximum Utilization for BestMaximum Utilization for BestPerformancePerformance Maximum Seeks per second = 169.5Maximum Seeks per second = 169.5 Knee of Curve at 80%Knee of Curve at 80%

    Configure for 125 I/Os per second perConfigure for 125 I/Os per second per

    disk for random I/Osdisk for random I/Os This is 75% of maximum capacityThis is 75% of maximum capacity

  • 8/8/2019 Oracle IO Topics

    17/64

    Sequential vs. RandomSequential vs. RandomI/OsI/Os Sequential I/O is much fasterSequential I/O is much faster

    Seek time 5.5 ms 0.7 msSeek time 5.5 ms 0.7 ms

    Same calculation yields 370 I/Os per secSame calculation yields 370 I/Os per sec

    or 277 I/Os per sec @ 75%or 277 I/Os per sec @ 75% > 300+ I/Os per sec is common for> 300+ I/Os per sec is common for

    sequentialsequential

    As I/Os increase so does LatencyAs I/Os increase so does Latency

  • 8/8/2019 Oracle IO Topics

    18/64

    Disk Layout for SequentialDisk Layout for SequentialI/OsI/Os Isolate Sequential I/OsIsolate Sequential I/Os

    Sequential Disk I/Os achieve maximumSequential Disk I/Os achieve maximumperformanceperformance 255+ I/Os per second per disk255+ I/Os per second per disk

    Sequential Access in OracleSequential Access in Oracle Redo LogRedo Log

    Archive Log filesArchive Log files

  • 8/8/2019 Oracle IO Topics

    19/64

    Disk Layout for Random I/OsDisk Layout for Random I/Os OLTP OLTP OLTP (online transaction processing)OLTP (online transaction processing)

    I/Os are fairly randomI/Os are fairly random

    Determine the frequency of accessDetermine the frequency of access

    Spread out the dataSpread out the data BalanceBalance

  • 8/8/2019 Oracle IO Topics

    20/64

    Disk Layout Random I/Os -Disk Layout Random I/Os -DSSDSS DSS (Decision support system)DSS (Decision support system)

    I/Os are made up of many sequentialI/Os are made up of many sequentialaccessesaccesses

    I/Os may be isolated to certain tablesI/Os may be isolated to certain tables

    Analyze the access patternsAnalyze the access patterns

    Use range partitioningUse range partitioning

  • 8/8/2019 Oracle IO Topics

    21/64

    I/O BalancingI/O Balancing Disk Arrays Provide Optimal DistributionDisk Arrays Provide Optimal Distribution

    Use Disk Striping (through RAID)Use Disk Striping (through RAID)

    Balance I/Os among logical volumesBalance I/Os among logical volumes

    Dont exceed disk throughput limitsDont exceed disk throughput limits Pushing too hard increases latenciesPushing too hard increases latencies

    Use all of the disks availableUse all of the disks available

    Disk Drives can do 125 IOPS randomDisk Drives can do 125 IOPS random 10 Disks can do 1,250 IOPS random10 Disks can do 1,250 IOPS random

    100 Disks can do 12,500 IOPS random100 Disks can do 12,500 IOPS random

  • 8/8/2019 Oracle IO Topics

    22/64

    Oracle Data Files andOracle Data Files andTablespacesTablespaces Use files and tablespaces in order toUse files and tablespaces in order to

    spread data across multiple disk arraysspread data across multiple disk arrays(LUNs)(LUNs)

    Spreading all your user database dataSpreading all your user database data

    across all the data disks usually gives theacross all the data disks usually gives thebest I/O performancebest I/O performance

    Separate the log disks from the data disksSeparate the log disks from the data disks

  • 8/8/2019 Oracle IO Topics

    23/64

    Create Database DiskCreate Database DiskViewView

    C:\C:\oracle\data\redo1.dbf

    E:\ E:\oracle\data\ts1a.dbf

    F:\ F:\oracle\data\ts1b.dbf

    G:\ G:\oracle\data\ts1c.dbf

    H:\ H:\oracle\data\redo2.dbf

    Data_TS

  • 8/8/2019 Oracle IO Topics

    24/64

    RAID Storage SubsystemsRAID Storage Subsystems RAID (Redundant Array of InexpensiveRAID (Redundant Array of Inexpensive

    Disks)Disks) RAID can provide Fault ToleranceRAID can provide Fault Tolerance

    Hardware Fault Tolerance is more efficientHardware Fault Tolerance is more efficient

    and faster than software fault toleranceand faster than software fault tolerance RAID LevelsRAID Levels

    RAID PerformanceRAID Performance

  • 8/8/2019 Oracle IO Topics

    25/64

    Fault tolerant hintsFault tolerant hints OS and binaries are hardest to replaceOS and binaries are hardest to replace

    Transaction log and transaction log backupsTransaction log and transaction log backupsare essential for recoveryare essential for recovery

    Database recovery can be time consumingDatabase recovery can be time consuming

    RAID will only protect you against disk failuresRAID will only protect you against disk failures

    RAID is not a substitute for backupsRAID is not a substitute for backups

  • 8/8/2019 Oracle IO Topics

    26/64

    RAID-0RAID-0 Striping across disksStriping across disks

    No fault toleranceNo fault tolerance Use all of the disk spaceUse all of the disk space Best PerformanceBest Performance Lose one disk and lose the dataLose one disk and lose the data

    1

    5

    9

    13

    2

    6

    10

    14

    4

    8

    12

    16

    3

    7

    11

    15

  • 8/8/2019 Oracle IO Topics

    27/64

    RAID-1RAID-1 Mirroring provides a copy or mirrorMirroring provides a copy or mirror

    Good fault toleranceGood fault tolerance Disk Space Available = Disk Drives / 2Disk Space Available = Disk Drives / 2

    RAID-1 does not have stripesRAID-1 does not have stripes

    Disk 1 Disk 1

    Mirror

  • 8/8/2019 Oracle IO Topics

    28/64

    2b

    4b

    6b

    8b

    1b

    3b

    5b

    6b

    RAID-0+1 (a.k.a. RAID 10)RAID-0+1 (a.k.a. RAID 10)

    Mirroring with StripingMirroring with Striping

    Good fault toleranceGood fault tolerance

    Disk Space Available = Disk Drives / 2Disk Space Available = Disk Drives / 2

    1a

    5a

    9a

    13a

    2a

    7a

    10a

    14a

    2b

    4b

    6b

    8b

    3a

    7a

    11a

    15a

    2b

    4b

    6b

    8b

    4a

    8a

    12a

    16a

    d 0 O

  • 8/8/2019 Oracle IO Topics

    29/64

    RAID-1 and RAID-10 I/ORAID-1 and RAID-10 I/OCharacteristicsCharacteristics

    Physical Reads = Logical readsPhysical Reads = Logical reads

    Physical Writes = Logical Writes x 2Physical Writes = Logical Writes x 2

    Good read performance canGood read performance cansimultaneously read from both diskssimultaneously read from both disksin the mirrored pairin the mirrored pair

  • 8/8/2019 Oracle IO Topics

    30/64

    RAID-5RAID-5 StripingStriping

    Distributed ParityDistributed Parity

    Disk space = Disk Drives - 1Disk space = Disk Drives - 1

    1

    4

    7

    Parity

    2

    5

    Parity

    10

    Parity

    6

    9

    12

    3

    Parity

    8

    11

    RAID 5 W iRAID 5 W it

  • 8/8/2019 Oracle IO Topics

    31/64

    RAID-5 WriteRAID-5 WriteStep 1: Data and Parity are ReadStep 1: Data and Parity are Read

    1

    4

    7

    Parity

    2

    5

    Parity

    10

    Parity

    6

    9

    12

    3

    Parity

    8

    11

    iRAID 5 W it

  • 8/8/2019 Oracle IO Topics

    32/64

    RAID-5 WriteRAID-5 WriteStep 2: New Parity isStep 2: New Parity is

    CalculatedCalculated

    1

    4

    7

    Parity

    2

    5

    Parity

    10

    Parity

    6

    9

    12

    3

    Parity

    8

    11

    XOR Engine Calculates

    parity

    RAID 5 W iRAID 5 W it

  • 8/8/2019 Oracle IO Topics

    33/64

    RAID-5 WriteRAID-5 WriteStep 3: Data and Parity areStep 3: Data and Parity are

    WrittenWritten

    1

    4

    7

    Parity

    2

    5

    Parity

    10

    Parity

    6

    9

    12

    3

    Parity

    8

    11

    RAID 5 I/O Ch i iRAID 5 I/O Ch t i ti

  • 8/8/2019 Oracle IO Topics

    34/64

    RAID-5 I/O CharacteristicsRAID-5 I/O Characteristics

    Reading simply reads off of the diskReading simply reads off of the diskthat contains the datathat contains the data

    WritingWriting Reads the data stripeReads the data stripe

    Reads the parity stripeReads the parity stripe Xors the data and writes it outXors the data and writes it out

    Calculates a new parity and writes it outCalculates a new parity and writes it out

  • 8/8/2019 Oracle IO Topics

    35/64

    Raid Cost SummaryRaid Cost Summary

    P

    ro

    tec

    tio

    n

    P

    ro

    tec

    tio

    n

    Cost

    RAID-1

    RAID-5

    RAID-0

    R id P fR id P f

  • 8/8/2019 Oracle IO Topics

    36/64

    Raid PerformanceRaid PerformanceSummarySummary

    P

    ro

    tec

    tio

    n

    P

    ro

    tec

    tio

    n

    Performance

    RAID-1

    RAID-5

    RAID-0

  • 8/8/2019 Oracle IO Topics

    37/64

    RAID SummaryRAID Summary RAID-0RAID-0

    No ProtectionNo Protection Best PerformanceBest Performance Least CostLeast Cost

    RAID-1RAID-1 Best ProtectionBest Protection Good PerformanceGood Performance Most ExpensiveMost Expensive

    RAID-5RAID-5 Good ProtectionGood Protection Worst PerformanceWorst Performance Least Expensive Fault TolerantLeast Expensive Fault Tolerant

    F lt T l TiF lt T l Ti

  • 8/8/2019 Oracle IO Topics

    38/64

    Fault Tolerance TipsFault Tolerance Tips

    Apply Fault tolerance to selectedApply Fault tolerance to selectedComponentsComponents

    RAID-1 on OS and Transaction LogRAID-1 on OS and Transaction Log

    RAID-5 on data drives if mostly reads or read-onlyRAID-5 on data drives if mostly reads or read-only

    RAID-1 or RAID-10 on data drives if heavy updateRAID-1 or RAID-10 on data drives if heavy updateactivity (lots of writes occur)activity (lots of writes occur)

    RAID-5 on backup disks (RAID 1 or RAID 10 ifRAID-5 on backup disks (RAID 1 or RAID 10 ifbackup is too slow)backup is too slow)

    C t ll O tiC t ll O ti

  • 8/8/2019 Oracle IO Topics

    39/64

    Controller OptionsController Options

    Read and Write CachesRead and Write Caches Read aheadRead ahead

    Stripe SizeStripe Size

    R d d W it C hR d d W it C h

  • 8/8/2019 Oracle IO Topics

    40/64

    Read and Write CachesRead and Write Caches

    Memory cache on the controllerMemory cache on the controller For performanceFor performance

    Cache ModesCache Modes

    ReadRead WriteWrite

    R d Ah d C hR d Ah d C h

  • 8/8/2019 Oracle IO Topics

    41/64

    Read Ahead CacheRead Ahead Cache

    Used when sequential access is detectedUsed when sequential access is detected Will read more data than is requested andWill read more data than is requested and

    put it in cacheput it in cache

    If the data is requested, the response isIf the data is requested, the response is

    immediateimmediate

    R d h d C t llRead ahead Controller

  • 8/8/2019 Oracle IO Topics

    42/64

    Read-ahead - ControllerRead-ahead - ControllerRead Cache OptionRead Cache Option

    May or may not be usefulMay or may not be useful Oracle does its own read-aheadOracle does its own read-ahead

    Excessive read-ahead by controller canExcessive read-ahead by controller cancause unnecessary I/Oscause unnecessary I/Os Higher performance can be achievedHigher performance can be achieved

    through reading from cache, but wontthrough reading from cache, but wontusually help Oracle performanceusually help Oracle performance 500 GB database500 GB database 7 GB Oracle buffer cache7 GB Oracle buffer cache 1 GB of SAN Controller cache1 GB of SAN Controller cache What do you think?What do you think?

    C t ll W it C hController Write Cache

  • 8/8/2019 Oracle IO Topics

    43/64

    Controller Write CacheController Write Cache Write is acknowledged as soon as it getsWrite is acknowledged as soon as it gets

    to the cacheto the cache Write performance is increasedWrite performance is increased

    If cache fills, write performance degradesIf cache fills, write performance degrades Hides the RAID 5 latency penaltyHides the RAID 5 latency penalty

    Back end must keep up or cache will fillBack end must keep up or cache will fill The controller gives priority to writing outThe controller gives priority to writing out

    the data in write cache over performingthe data in write cache over performingreads from diskreads from disk

    Therefore, read performance sometimesTherefore, read performance sometimessuffers at the expense of writessuffers at the expense of writes

    This is true for data files, NOT for log filesThis is true for data files, NOT for log files

    O l W it t D t FilOracle Writes to Data Files

  • 8/8/2019 Oracle IO Topics

    44/64

    Oracle Writes to Data FilesOracle Writes to Data Files

    How an Oracle write occurs:How an Oracle write occurs: Page to be modified is read from disk into SQL bufferPage to be modified is read from disk into SQL buffer

    cachecache

    Data is modified (written to) in the buffer cacheData is modified (written to) in the buffer cache

    Oracle user needing that write can now continue withOracle user needing that write can now continue with

    other work considers the write finishedother work considers the write finished Since memory is a limited quantity, eventually modifiedSince memory is a limited quantity, eventually modifieddata pages must be written to disk (by the Databasedata pages must be written to disk (by the DatabaseWriter Process)Writer Process)

    When write to disk is made, the controller write cacheWhen write to disk is made, the controller write cachethen comes into play the user does not knowthen comes into play the user does not know

    Si ifi f O lSignificance of Oracle

  • 8/8/2019 Oracle IO Topics

    45/64

    Significance of OracleSignificance of OracleWritesWrites

    Since Oracle writes occur in theSince Oracle writes occur in thebuffer cache, no user waits on databuffer cache, no user waits on datafile writes to disk!!!file writes to disk!!! Thus read performance for data files isThus read performance for data files is

    more important than write performancemore important than write performance For log files, write performance is moreFor log files, write performance is more

    importantimportant

    When to Use the ControllerWhen to Use the Controller

  • 8/8/2019 Oracle IO Topics

    46/64

    When to Use the ControllerWhen to Use the ControllerWrite CacheWrite Cache

    The controller write cache is notThe controller write cache is notuseful for database files and may hurtuseful for database files and may hurtread performanceread performance

    The controller write cache is usefulThe controller write cache is usefulfor the redo log logwriter processfor the redo log logwriter process

    Write caching can be configured on aWrite caching can be configured on a

    per-LUN basisper-LUN basis

    Stripe SizeStripe Size

  • 8/8/2019 Oracle IO Topics

    47/64

    Stripe SizeStripe Size

    How much data is on each diskHow much data is on each disk Important for OracleImportant for Oracle Seek time is part of total transfer timeSeek time is part of total transfer time Configure stripe size large enough toConfigure stripe size large enough to

    avoid causing extra I/Osavoid causing extra I/Os You only want one seek per requestYou only want one seek per request You want to only go to one disk driveYou want to only go to one disk drive

    Default of 64K is usually pretty goodDefault of 64K is usually pretty good

    If you want to try different stripe sizes,If you want to try different stripe sizes,increase, dont decrease the stripe sizeincrease, dont decrease the stripe size

    Stripe SizeStripe Size

  • 8/8/2019 Oracle IO Topics

    48/64

    Stripe SizeStripe Size The data is distributed across all of the diskThe data is distributed across all of the disk

    drives in 64K piecesdrives in 64K pieces

    1

    5

    9

    13

    2

    6

    10

    14

    4

    8

    12

    16

    3

    7

    11

    15

    64K Pieces

    Review of Oracle StorageReview of Oracle Storage

  • 8/8/2019 Oracle IO Topics

    49/64

    Review of Oracle StorageReview of Oracle StorageConceptsConcepts

    Oracle performance is extremelyOracle performance is extremelydependent on the performance of thedependent on the performance of theI/O subsystemI/O subsystem Redo Log performance limits transactionRedo Log performance limits transaction

    processingprocessing Read performance of data files limitsRead performance of data files limits

    query response timequery response time

    Write performance of data files slowsWrite performance of data files slowsdown the DBWR processesdown the DBWR processes

    Redo Log PerformanceRedo Log Performance

  • 8/8/2019 Oracle IO Topics

    50/64

    Redo Log PerformanceRedo Log Performance

    Redo log entries must be written whenever aRedo log entries must be written whenever achange is made to the data files or wheneverchange is made to the data files or whenevera commit is issueda commit is issued

    Redo log entries are written into the redo logRedo log entries are written into the redo log

    bufferbuffer The LGWR process takes redo log entries andThe LGWR process takes redo log entries and

    writes them out to the redo logwrites them out to the redo log

    If the LGWR cannot keep up, transactions waitIf the LGWR cannot keep up, transactions wait

    Read PerformanceRead Performance

  • 8/8/2019 Oracle IO Topics

    51/64

    Read PerformanceRead Performance

    Most criticalMost critical Logical reads (to the buffer cache)Logical reads (to the buffer cache)

    takes CPU and bus resourcestakes CPU and bus resources

    Each physical read takes time andEach physical read takes time andresourcesresources Query processing time is directlyQuery processing time is directly

    related to I/O latencyrelated to I/O latency

    Each individual I/O operation takes aEach individual I/O operation takes afinite timefinite time

    Many operations are serial in natureMany operations are serial in nature

    Read PerformanceRead Performance

  • 8/8/2019 Oracle IO Topics

    52/64

    Read PerformanceRead PerformanceExampleExample An index lookup might take 50 individual readsAn index lookup might take 50 individual readsof data from the data filesof data from the data files

    Each I/O takes 10 msEach I/O takes 10 ms Total index read time would be 500 msTotal index read time would be 500 ms

    What if I/O latency were 50 msWhat if I/O latency were 50 ms Total index read time would be 2.5 secondsTotal index read time would be 2.5 seconds

    This is totally unacceptableThis is totally unacceptable

    Oracle I/O performanceOracle I/O performance

  • 8/8/2019 Oracle IO Topics

    53/64

    Oracle I/O performanceOracle I/O performanceissues on SANissues on SAN

    All I/O operations are going through one 100All I/O operations are going through one 100MByte linkMByte link Or 200 MByte link for FC2Or 200 MByte link for FC2

    Other systems in the SAN might be causingOther systems in the SAN might be causingload on the storage arrayload on the storage array

    SAN software may be causing additionalSAN software may be causing additionaloverheadoverhead

    Performance monitoring of I/O operations onPerformance monitoring of I/O operations oneach system only gives you part of the storyeach system only gives you part of the story

    Fibre Channel BandwidthFibre Channel Bandwidth

  • 8/8/2019 Oracle IO Topics

    54/64

    Fibre Channel BandwidthFibre Channel Bandwidth

    Depending on the type of I/O operations beingDepending on the type of I/O operations beingdone you may be disk bound or Fibre Channeldone you may be disk bound or Fibre ChannelBandwidth boundBandwidth bound

    Other systems load may be taking up yourOther systems load may be taking up yourbandwidthbandwidth

    Switches help, but shared storage in a singleSwitches help, but shared storage in a singlestorage unit can be a bottleneckstorage unit can be a bottleneck

    Use multiple paths to the storage if necessaryUse multiple paths to the storage if necessary

    SAN I/O PerformanceSAN I/O Performance

  • 8/8/2019 Oracle IO Topics

    55/64

    SAN I/O PerformanceSAN I/O Performance

    Fibre Channel bus is 100 MB/sec (FC1)Fibre Channel bus is 100 MB/sec (FC1) Theoretical maximum of 351 GB/hrTheoretical maximum of 351 GB/hr

    Storage Processor can do 50 MB/secStorage Processor can do 50 MB/sec Theoretical maximum of 175 GB/hrTheoretical maximum of 175 GB/hr

    Throw in software (varies by OS) overheadThrow in software (varies by OS) overhead More like 25 MB/sec = 87 GB/hrMore like 25 MB/sec = 87 GB/hr

    SAN I/O Performance (cont )SAN I/O Performance (cont )

  • 8/8/2019 Oracle IO Topics

    56/64

    SAN I/O Performance (cont.)SAN I/O Performance (cont.)

    NetworkNetwork GigabitGigabit

    125 MB/sec = 439 GB/hr125 MB/sec = 439 GB/hr

    100baseT100baseT

    12.5 MB/sec = 44 GB/hr12.5 MB/sec = 44 GB/hr 10baseT10baseT

    1.25 MB/sec = 4.4 GB/hr1.25 MB/sec = 4.4 GB/hr

    Tape can do 4 MB/secTape can do 4 MB/sec

    Theoretical Maximum of 14 GB/hrTheoretical Maximum of 14 GB/hr

    Transfer SpeedTransfer Speed

  • 8/8/2019 Oracle IO Topics

    57/64

    Transfer SpeedTransfer SpeedComparisonComparison

    050100150

    200250300350400450500

    Gig

    abit

    Fibr

    eCha

    nnel

    Storag

    ePr

    oce

    ssor

    NTF

    S

    100b

    aseT

    T

    ape

    10bas

    eT

    G

    B/hr

    SAN PerformanceSAN Performance

  • 8/8/2019 Oracle IO Topics

    58/64

    SAN PerformanceSAN Performance

    20 drive SAN might perform to 2,50020 drive SAN might perform to 2,500IOPS at 10 msIOPS at 10 ms

    20 drive SAN is capable of 5,000 IOPS,20 drive SAN is capable of 5,000 IOPS,

    but at 100 ms latencybut at 100 ms latency Latency is much more important thanLatency is much more important than

    throughputthroughput

    The performance of the SAN at theThe performance of the SAN at thelowest level relates to the performancelowest level relates to the performanceof the disk drives and SAN configurationof the disk drives and SAN configuration

    What About RAID?What About RAID?

  • 8/8/2019 Oracle IO Topics

    59/64

    What About RAID?What About RAID?

    RAID overhead can be significantRAID overhead can be significant

    RAID 0 offers no protection and noRAID 0 offers no protection and nooverheadoverhead

    RAID 1 or 0+1 offers good protectionRAID 1 or 0+1 offers good protection

    but with a 2x write overheadbut with a 2x write overhead RAID 5 offers moderate protectionRAID 5 offers moderate protection

    but with a 4x write overheadbut with a 4x write overhead

    RAID overhead can significantlyRAID overhead can significantlyaffect performanceaffect performance

    Storage Consolidation MightStorage Consolidation Might

  • 8/8/2019 Oracle IO Topics

    60/64

    Storage Consolidation MightStorage Consolidation MightCause Subsystem OverloadCause Subsystem Overload

    Since several or many systems may share the sameSince several or many systems may share the samestorage the processor managing that storage mightstorage the processor managing that storage mightbecome overloadedbecome overloaded

    The CPUs in the storage unit is finite and can only processThe CPUs in the storage unit is finite and can only processa finite amount of dataa finite amount of data

    Monitoring your storage CPUs is usefulMonitoring your storage CPUs is useful

    RAID overhead = more CPU processingRAID overhead = more CPU processing

    SAN Software Could CauseSAN Software Could Cause

  • 8/8/2019 Oracle IO Topics

    61/64

    SAN Software Could CauseSAN Software Could CauseAdditional LatenciesAdditional Latencies

    Many SAN systems require additionalMany SAN systems require additionalsoftware that might increase latenciessoftware that might increase latencies

    The more layers the I/Os have to go throughThe more layers the I/Os have to go throughthe more overhead involvedthe more overhead involved

    Oracle is very sensitive to I/O latencyOracle is very sensitive to I/O latency

    I/O Monitoring Might BeI/O Monitoring Might Be

  • 8/8/2019 Oracle IO Topics

    62/64

    I/O Monitoring Might BeI/O Monitoring Might BeInaccurate or WrongInaccurate or Wrong

    Each system can only see the I/OsEach system can only see the I/Osthat it generatesthat it generates

    The load on the storage system is theThe load on the storage system is thecumulative I/O operations of all thecumulative I/O operations of all theservers that access itservers that access it

    Additional monitoring is necessaryAdditional monitoring is necessary

    ReviewReview

  • 8/8/2019 Oracle IO Topics

    63/64

    ReviewReview Since most transactional databases use an 8K block size,Since most transactional databases use an 8K block size,

    the optimum stripe depth for a striped RAID group is 8K.the optimum stripe depth for a striped RAID group is 8K.

    What is wrong with this statement?What is wrong with this statement? What is the maximum I/Os per second that you should try toWhat is the maximum I/Os per second that you should try to

    push through a single 15,000 rpm disk?push through a single 15,000 rpm disk?

    True or False: Slow data writes to disk are a significantTrue or False: Slow data writes to disk are a significantcause of Oracle user waitscause of Oracle user waits

    What is the difference between seek time and rotationalWhat is the difference between seek time and rotational

    latency?latency? What types of Oracle files are sequentially accessed?What types of Oracle files are sequentially accessed?

    Under what conditions would RAID-5 be undesirable? UnderUnder what conditions would RAID-5 be undesirable? Underwhat conditions would RAID-5 be acceptable?what conditions would RAID-5 be acceptable?

    True or False: Controller write cache is important in tuningTrue or False: Controller write cache is important in tuning

    Oracle data write performance.Oracle data write performance.

    SummarySummary

  • 8/8/2019 Oracle IO Topics

    64/64

    SummarySummary Sizing is very important - # of disksSizing is very important - # of disks

    Choose the right RAID levelChoose the right RAID level Choose the right stripe sizeChoose the right stripe size

    Dont always count on the SANDont always count on the SAN

    features helpingfeatures helping A poorly designed SAN will performA poorly designed SAN will perform

    poorlypoorly

    The performance of the disk drivesThe performance of the disk drivesdetermines the performance of thedetermines the performance of theI/O subsystemI/O subsystem