03a Controlling Resources Part 1
03a Controlling Resources Part 1
• Smart IO
• IO Resource Manager
• Compression
• Hands-on time
• Exadata Security
• Flash Cache
• Storage Indexes
• Parallel Execution
Agenda
• Smart IO
• IO Resource Manager
• Compression
SMART IO
How we (used to) read and write data
• NO !
• Yes !
• Limit the amount of processing done on the database nodes
• Scanning full tables on the storage, not on the DB nodes
• Only retrieve columns and rows that you actually need
• Encrypt and Decrypt on the storage side, not on the DB
• Transfer tasks (writing zero‟s to datafiles) to the storage
• Smart scan
• Query 1TB and only receive process the actual results, not 1TB
• Retrieve parts from flash and parts from disk
• Smart file creation and block formatting
• Let the storage write the 5TB of zero‟s for the new datafiles
instead of the database nodes. Parallel and faster !
• Both new tablespaces but also RMAN restore benefit
• Smart incremental backup
• Let the storage decide which blocks to back-up. Parallel, fast so
no more full database scans from the RMAN process
• Smart Scans on Encrypted Columns and Tablespaces
• Smart Scans for Data Mining Scoring
Smart Scan, first get the basics
This is generic Oracle business
• Database sessions read one or more blocks in the SGA
• After reading/processing, the block stays in the SGA
• Sessions can re-use the block in the SGA
• Storage allocated based on Most Recent Used Algorithm
• Database sessions read blocks in the PGA
• Amount of data too large to fit in the SGA
• Called „Direct reads‟, stored in the sessions PGA
• Blocks evaluated as they come in
• Blocks deleted after usage (new query means reading again)
• CELL_OFFLOAD_PLAN_DISPLAY parameter
• AUTO (default)
• Explain plan will show predicate offload only if tablespace
resides on Exadata storage
• ALWAYS
• Explain plan will show predicate offload whether the
tablespace resides on Exadata storage or not
• NEVER
• Explain Plan will never indicate predicate offload even if
tablespaces resides on Exadata storage
Detecting Scan offloads
Phys. IO 10Gb
Phys. IO eligible for offload 10Gb
Phys. IO interconnect 2Gb
2Gb
Efficiency: = = 20%
10Gb
V$SYSTAT values and efficiency
select a.name, b.*
from table a, table b
where a.id = b.id
and a.col >= 100
Phys. IO 10Gb
Phys. IO eligible for offload 5Gb
Phys. IO interconnect 5Gb
1Gb
Efficiency: = = 20%
5Gb
5Gb
Efficiency: = = 50%
10Gb
V$SQL makes it easier
• Cellsrv is
• Multi-threaded
• Serves block IO and smart IO
• Runs a piece of RDBMS code to support smart IO
• Can provide storage to one or more databases
• Does not communicate with other cells
Predicate disk data flow
PredicateCachePut –
Queues new IO requests • Jobs can execute
concurrently
• Concurrent IOs can be
IO jobs – issues IOs
PredicateDiskRead
issued for a single
RDBMS client
• Concurrent filter jobs
PredicateFilter – can be applying
Filter raw data predicates
• Exadata adds another
level of parallelism in
PredicateCacheGet – query processing
Send result back
Other Smart improvements
• Smart Scan
• cell smart table scan - Database is waiting for table scans to
complete on a cell.
• cell smart index scan - Database is waiting for index or index-
organized table (IOT) fast full scans.
• Smart file creation
• cell smart file creation - Event appears when the database is waiting
for the completion of a file creation on a cell.
• cell smart restore from backup - Event appears when the database
is waiting for the completion of a file initialization for restore from
backup on a cell.
• Smart incremental Backup
• cell smart incremental backup - Event appears when the database is
waiting for the completion of an incremental backup on a cell.
Exadata Smart Features - Summary
• Smart IO
• IO Resource Manager
• Compression
IO RESOURCE MANAGEMENT
Why Would Customers Be Interested
in I/O Resource Manager?
• Exadata Storage can be shared by multiple types of
workloads and multiple databases
• Sharing lowers administration costs
• Sharing leads to more efficient usage of storage
• But, workloads may not happily coexist
• ETL jobs interfere with DSS query performance
• One production data warehouse can interfere with another
15 GB/s
Storage Network
Storage
desired
bandwidth:
Development 15 GB/s
Database
IO Manager solves the problem
Production Database
actual bandwidth:
200 MB/s 0.2+12.8 + 8 =
30.2 21 GB/s
actual bandwidth:
0.2 + 12.8 GB/s available I/O
Bandwidth:
21 GB/s
15 12.8 GB/s
Storage Network
Storage
actual bandwidth:
15 8 GB/s
Development
Database
When Does I/O Resource Manager
Help the Most?
• Conflicting Workloads
• Multiple consumer groups
• Multiple databases
• Concurrent database administration
• Backup, ETL, File creation etc
Disk Queue
I/O
RDBMS
Requests Traditional
Storage H L H L L L
Server
RDBMS
High-Priority Low-Priority
Workload Workload
I/O Scheduling, the Exadata Way
HH
Sales
Database LLL
Sales-Priority
Low Priority Resource
Group Queue
I/O
Finance Data Warehouse Resource L H H H
High Priority Consumer Manager
Group Queue
H Finance-Priority
Finance
Database LLLL
Low Priority Consumer
Group Queue
Plans are known by the CellSRV
• On disk Level
• Minimum % of IO
• Only kicks in when fighting over disk IO‟s
• Speed may vary but has a guaranteed minimum
• Limited % of IO
• Always limiting IO to certain %
• Even if system is not being used
• On Flash Level
• No need to limit flash I/O – fast enough
• Limit access to Flash storage space
How to Configure Inter-Database IORM
• Between databases
• User the “limit” parameter in the IORMPlan
• Example:
ALTER IORMPLAN
dbplan=((name=prod, limit=75),
(name=test, limit=20),
(name=other, limit=5))
Control access to flash cache
Starting patchset 11.2.0.2
• Prevent databases to access flash cache
• Low priority databases, Test databases etc
• Production database
• Users doing normal production
On IO Resource Manager
Agenda
• Smart IO
• IO Resource Manager
• Compression
COMPRESSION
Data Growth Challenges
• How it Works
• Tables are organized into Compression Units
10x to 15x • CUs are larger than database blocks
Reduction • Usually around 32K
• Within Compression Unit, data is organized by
column instead of by row
• Column organization brings similar values
close together, enhancing compression
Hybrid Columnar Compression
Technology Overview
• Compression Unit
• Logical structure spanning multiple database blocks
• Data organized by column during data load
• Each column compressed separately
• All column data for a set of rows stored in compression unit
• Typically 32k (4 blocks x 8k block size)
10
TB
100 TB
Compress for Archive
Built on Hybrid Columnar Compression
• Compression algorithm optimized for max storage savings
• Benefits any application with data retention requirements
• Best approach for ILM and data archival
• Minimum storage footprint
• No need to move data to tape or less expensive disks
• Data is always online and always accessible
• Run queries against historical data (without recovering from tape)
• Update historical data
• Supports schema evolution (add/drop columns)
Compress for Archive
• Data Warehouses
• Table Partitioning
• Heavily accessed data (read)
• Partitions using Compress for Query
• Cold or historical data
• Partitions using Compress for Archive
Hybrid Columnar Compression
Outside of Exadata
SQL> @advisor
Table: GL_BALANCES
Compression Type: Compress for Query HIGH
Estimated Compression Ratio: 10.17
SQL>
Hybrid Columnar Compression
Customer Success Stories