You are on page 1of 42

“This presentation is for informational purposes only and may not be incorporated into a contract or agreement.


The following is intended to outline our general product direction. It
is intended for information purposes only, and may not be
incorporated into any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be relied upon in
making purchasing decision. The development, release, and timing
of any features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.
Ara Shakian
Principal Product Manager
Oracle Server Technologies
Take the Guesswork out
of Database I/O Tuning

An Oracle Open World 2005


Presentation
Agenda

• Storage Management Challenges


• Application of S.A.M.E. Methodology
• Optimizing I/O for Bandwidth, Access and
Workload types
• Automatic Storage Management Overview
• Striping and Mirroring Discussions
• ASM Best Practices
• Conclusion
Storage Management Gap
Avg. Managed Capacity per Administrator
In Database Sites with >100 GB Capacity
60
50
Disk
40 Capacity
Capacity in Mgmt Gap
30
Terabytes Capacity
20 /DB Adm

10
Capacity
0 /DB Admin
With ASM
97

98

99

00

01

02

03

04

05
(estimated)
19

19

19

20

20

20

20

20

20
Strategic Research Corporation
What Guesswork?
• Configuring storage for a DB depends on too many
variables
• Which data to put on which disk
• LUN configurations
• DB application workloads
• OLTP, DSS, Batch vs. On-Line
• Tradeoffs between available options

• Did I choose the right configuration?


• On-going tuning
Typical Day for a DBA
and System Admin
• Design DB layout strategy
• How many volumes, data files
• Where data files reside
• Inventory of files:
• 2 control files, 2 log files, multiple datafiles per
tablespace, backup files, temp files, etc…
• 100’s or 1000’s of files to create, name, manage
and not make mistakes!
• Multiplied by n number of Databases
• What about tuning, expanding/contracting your DB ?
Whiteboard Management
The Key Question
How should I configure and tune my Oracle
Database 10g storage environment?

 Conventional answer is: It Depends


- Workloads Conventional FS/VM/RAW choices:
- Storage configurations - Too complicated
- RAC vs. single Instance - Too slow
- FS/VM or RAW - Too Expensive

• Right answer is:


Automatic Storage Management (ASM)
ASM is the Implementation of
Oracle S.A.M.E. Methodology

• The goal of S.A.M.E. is to optimize


storage I/O utilization

• Bandwidth
• Sequential and random access
• Workload types
Optimizing Sequential
Access
• The key to efficient sequential IO is to make
positioning time small relative to transfer time
• Positioning time is overhead
• Make: Transfer time >= 5 * Positioning time
• Implies disk access must be at least 1MB in size

IO S iz e P o s itio n in g X fe r % T im e
T im e T im e X fe r in g
6 4 K 1 0 m s 3 m s 2 3 %

2 5 6 K 1 0 m s 1 2 m s 5 5 %

1 M 1 0 m s 5 0 m s 8 3 %

2 M 1 0 m s 1 0 0 m s 9 1 %

* Oracle S.A.M.E. research data, 1999


Optimizing Transfer Time

Create LUNs using ‘outside Position on Disk


(measured in
Tranfer Rate

of disk’ capacity)
Outer Edge 22 MB/sec
• Disks hold more data towards Outer Quarter 21 MB/sec
outside edges than towards Mid Point 19 MB/sec
center Inner Quarter 16 MB/sec
• Transfer rate is faster for data Inner Edge 11 MB/sec
near outside

Flash Recovery Area (FRA)

* Oracle S.A.M.E. research data, 1999


Optimizing Random Access

Key to optimizing random % of Disk Avg Seek


Used in Dist.
% Disk Space Avg Read
Used Time (seek
distance + rotation)
access is to limit length from outer
edge
of seek 25% 8% 33% 4.8ms
• Place hot data on outside 50% 17% 60% 5.7ms
of disk to utilize increased
75% 25% 85% 6.5ms
density
• Limiting access to outside 100% 33% 100% 7.3ms
half of disk gets most of
seek benefit

* Oracle S.A.M.E. research data, 1999


Summary of Lessons Learned

• Use ASM to stripe data at 1MB


extents
• Equalize the workload across disks and ASM
eliminate hot spots
• Maximize disk drives in ASM
• Optimum sequential bandwidth gained
thru 1MB I/O
• Place frequently used data at outer
half of disk Law of
• Fastest transfer rate
Physics
• Minimize seek time
How Do I Design for different
Workload Types?

 Conventional answer is: It Depends

• Right answer is:


You don’t have to
Oracle Database 10g &
Automatic Storage Management (ASM)
Don’t Worry about Workloads
Oracle DB and ASM are designed to reduce the
complexity

• Complexity stems from


• Application types
• OLTP, DW, batch, and mixed-workloads
• Many operation types
• Scan, lookup, load, insert, create index, join, LOB,
sort, backup, recovery, batch write, etc.
• Many file types
• Data, log, archive, temp, undo, system, control,
backup, etc.
Oracle DB Designed to
Perform Large I/O When Possible
Oracle performs 1MB I/O when possible
• DBWR (the main server process) – Coalesces
adjacent buffers to max size of 1MB
• Kernel sequential file I/O – buffer size is set to 1MB
by default
• Archiver writes 1MB I/Os
• Log Writer – Max I/O size is set to 1MB
Oracle Parallelizes I/O
at the Highest Level
• Sequential I/O is optimized by Oracle
• Scans, loads, backups, log writes, sorts, etc.
• Sequential operations issue large I/O, Random
operations issue small I/O
• Read-ahead for sequential I/O operations
• Oracle can parallelize many operations
• Scan, sorts, joins, hash, load, create index, etc.
Workload Summary

Database storage management does not have


to be complex any more

• Oracle Database 10g and ASM are designed


to hide the complexity for all workload types
• Large (1MB) I/O to optimize sequential
performance
• Parallelizes many operations
• Distribute data evenly and widely for maximum
performance
Automatic Storage Management
A storage manager designed to manage Oracle Database
10g database files – offered at no additional cost
• Volume Manager
• File System
• Clustering capabilities

Reduce Cost and Complexity Without Compromising


Performance or Availability
Simplifies and Increases Predictably Delivers
Automates Storage on Performance &
Database Storage Utilization and Availability
Management Agility SLA’s
ASM Key Features
1. Volume Management with
1MB or 128KB striping
2. Database File System with
performance of RAW I/O
ASM
Disk Group 3. Supports clustering and
LUN LUN
single instance
4. Dynamic data distribution and
LUN rebalancing
5. Automatic file management
6. Flexible mirror protection
Let’s Talk About
Storage Configurations
&
Best Practices
Migrating from 9i to 10g?
Choice for Storage Management?
S
3 rd CF • ASM is Oracle’s strategic
Party
O CF S
M direction
AS VM
R AW • Use ASM for database
files
• Highest value for Managing
Oracle DB files
• Use OCFS for Oracle
binaries (where available)
Which RAID Configuration for Best
Performance and Availability?

A. ASM mirroring
B. Hardware RAID 1 (mirroring)
C. Hardware RAID 5 (Parity Protection)
D. Both ASM mirroring & hardware RAID

Answer: Depends on business requirement and


budget (cost, availability, performance
& utilization)
ASM leverages hardware RAID
Should I Use RAID 1 or RAID 5
RAID 1 (Mirroring) RAID 5 (Parity)
- Recommended by Oracle -Your mileage will vary
- Most demanding applications - DSS and moderate OLTP

PRO PRO
• Best redundancy • Requires less capacity
• Best performance CON
• Low recovery overhead • Less redundancy
CON • Less performance
• Requires higher capacity • High recovery overhead
ASM Mirroring Protection

• Best choice for low cost


storage
• Mirror across storage sub-
systems
• Automatic recovery from
block corruption

ASM Disk Group


To Stripe or Not to Stripe:
What Type of Striping Works
Best?
A. ASM only striping (no RAID)
B. Hardware RAID 0 & ASM striping
C. Use LVM
D. No striping

Answer: A & B
ASM & RAID striping are
complimentary!
ASM Striping Only
Oracle DB size: 1TB PRO CON
(1TB Data File, 2TB Flash • Drives evenly distributed • Not well balanced across
Recovery Area) for Data & FRA ALL disks
• Higher bandwidth • LUN size limited to disk
Storage Configuration: • Allows small incremental size
8 x Trays with 12 x 73GB disks growth (73GB)
per array • No drive contention
(Total capacity: 7TB)

Data Diskgroup (1TB) FRA Diskgroup (2TB)


LUN 1 16 LUN 17 48

73GB LUN 73GB LUN


RAID 1
Hardware RAID Striped LUNs
PRO CON
Oracle DB size: 1TB
• Fastest region for • Large incremental growth
(1TB Data File, 2TB Flash
Data DG • Data & FRA (friendly)
Recovery Area)
• Balanced data distribution contention
• Fewer LUNs to manage
Storage Configuration:
while max spindles
8 x Trays with 12 x 73GB disks
per array
(Total capacity: 7TB)

Data Diskgroup (1TB) FRA Diskgroup (2TB)


LUN 1 2 3 4 LUN 5 6 7 8

250GB LUNs 500GB LUNS


RAID 0+1
Customer Benchmark: 200-300% Increase
Vanderbilt University In Performance!

Database Environment:
• 9iRAC vs. 10gRAC 72:00:00

Storage: 9i RAC/LVM/RAW vs. 10gR2 RAC/ASM


EMC Symetrix- 16 drives 60:00:00
4 LUNs, each 4-way striped 9i RAC and Legacy LVM
(RAID0)
16 LUNs, LUN=disk drive 48:00:00

Elapsed Time
( no RAID0)
10g R2 RAC+ASM
9i/LVM
36:00:00 ASM
ASM+RAID0

10g R2 RAC
24:00:00 ASM+RAID0
Benchmark Environment:
Sqlbench – Most intensive sql queries
12:00:00
Indexbench – collection of drops &
re-builts in parallel
0:00:00
IndexBench1 IndexBench2 IndexBench3 IndexBench4 SQLBEnch1 SQLBEnch2 SQLBEnch3 SQLBEnch4

Benchmark type
RAID 5 (7+1) or
Linear scaling from 200MB/sec to 1600/MB/sec
RAID 1 LUNs
• Saturates FC HBAs – a good thing
• RAID 5 (7+1) DS8000 IBM storage with 16 LUNs
• Modified tcp-h DSS query (read only)
• 2/4/6/8 nodes (AIX LPARS)
• LUN configuration as shown

Database 1 Database 2

Data DG FRA DG Data DG FRA DG

LUN 1 LUN 16

Data1
FRA1
Data2
…….
FRA2
How Many Disk Groups per
Database?
Data Disk Group • 2 Disk Groups are recommended
Data, redo log, control file types • Backup for each other
• Leverage maximum of disk
Flash Recovery Area
per disk group
Disk Group
Archive log, backup, temp • Exceptions
files types
• Additional Disk Groups for
different capacity or
performance characteristics
• Different storage tiers
Should I Consolidate Multiple
DBs in a Disk Group?
LAN
• YES
RAC 10g 10g • Shared storage across several
ASM ASM ASM databases
• RAC and Single Instance
Data DG FRA DG • Benefits:
A ERP Database • Higher storage utilization
S CRM Database • Lower cost
M HR Database • Higher performance
• More LUNs/DG
• Simplified and
Centralized management
It’s Real Simple!
You Don’t have to Guess Anymore
• Use Oracle Database 10g ASM for volume
and file management
• External RAID protection when possible
• Create LUNs using
• Outside half of disk drives for highest performance
• Small disk, high rpm (I.e. 73GB/15k rpm)
• Maximize number of spindles in your disk
group
Oracle Database 10g and ASM do the rest!
Hundreds of ASM Customers
In Production
Amazon.com

Advance America
Just Remember
ASM is the realization of the
S.A.M.E. methodology plus more…
• ASM automates to reduce human errors
• Simplifies configuration choices
• Eliminates workload type dependencies
• Optimizes IO bandwidth
• Reduces cost

• And, washes the dishes for you too!


ASM Featured in OOW 2005

• Exhibit Demos
• Oracle and partner booths
• ASM specific sessions
• 5 ASM specific presentations
• 20+ RAC & ASM presentations
• X-treme Lab RAC, ASM & Grid Control
ASM Featured in OOW 2005
ID Time Room Title
S1973 Tuesday 304 – South Amazon: Using Oracle Real Application Clusters
11:00 AM and Oracle Database 10g Automatic Storage
Management to Enable Scaling on Linux with Low-
Cost Storage
S943 Tuesday 104 – South Database Storage Consolidation - 10g Release 2
11:00 AM Automatic Storage Management update

S027 Tuesday 305 – South Oracle 10g Release 2 Customer Panel:


3:00 PM Experiences with RAC and ASM

S1955 Thursday 305 – South Oracle Real Application Clusters & Automatic
9:00 AM Storage Management: Best Practices

S1949 Thursday 103 – South Take the Guesswork Out of Database I/O Tuning
10:30 AM
ASM OTN Web Site:
http://www.oracle.com/technology/products/database/asm/index.html
Take the Guesswork out of
Database I/O Tuning

An Oracle Open World 2005 Presentation

You might also like