SlideShare a Scribd company logo
1 of 31
Download to read offline
Why You May Not Need Offloading
Presented by: Alex Fatkulin
Senior Consultant
January 20, 2013
Who am I ?
 Senior Technical Consultant at Enkitec

 12 years using Oracle
 Clustered and HA solutions
 Database Development and Design
 Technical Reviewer
 Blog at http://afatkulin.blogspot.com

3
Why This Presentation?

4
Sounds familiar?

(tongue in cheek)

 My SQL is slow but it’s offload ratio is 95%+
 This just can’t be!

 My SQL is slow and it must be because it has a low
offload ratio
 This ought to be it!

 Offload ratio is the only thing to worry about
 Nothing else matters!

5
What is offload ratio?
 The amount of work performed on the storage cells
relative to the total amount of work

𝑊(𝐶𝐸𝐿𝐿)
𝑅=
𝑊 𝐶𝐸𝐿𝐿 + 𝑊(𝑅𝐷𝐵𝑀𝑆)

6
I/O Saved (MOS)
 MOS Doc ID 1438173.1
𝐼𝑂_𝑆𝐴𝑉𝐸𝐷 =

𝐼𝑂_𝐶𝐸𝐿𝐿_𝑂𝐹𝐹𝐿𝑂𝐴𝐷_𝐸𝐿𝐼𝐺𝐼𝐵𝐿𝐸_𝐵𝑌𝑇𝐸𝑆 − 𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆
𝐼𝑂_𝐶𝐸𝐿𝐿_𝑂𝐹𝐹𝐿𝑂𝐴𝐷_𝐸𝐿𝐼𝐺𝐼𝐵𝐿𝐸_𝐵𝑌𝑇𝐸𝑆
=1 −

𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆
𝐼𝑂_𝐶𝐸𝐿𝐿_𝑂𝐹𝐹𝐿𝑂𝐴𝐷_𝐸𝐿𝐼𝐺𝐼𝐵𝐿𝐸_𝐵𝑌𝑇𝐸𝑆

 IO_INTERCONNECT_BYTES
 Includes all types of I/O against any storage
 Includes mirrored data
 Compressed vs Uncompressed data

7
Cell Offload Efficiency (SQLMON)
 SQL Monitor

C=1 −

𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆
𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑅𝐸𝐴𝐷_𝐵𝑌𝑇𝐸𝑆 + 𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑊𝑅𝐼𝑇𝐸_𝐵𝑌𝑇𝐸𝑆

 Only considers data volumes

8
Offload Ratio
 Two SQL statements return the same data but have
different plans and offload ratios
SQL Statement

Offload ratio
A

90%

B

0%

 Which one is better?

9
Offload Ratio
 Two SQL statements return the same data but have
different plans and offload ratios
SQL Statement

Offload ratio

Scanned

Returned

A

90%

100GB

10GB

B

0%

10GB

10GB

 Using offload ratio alone is unreliable indicator for
performance

10
90% Offload Ratio
SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’

100%

CELLSRV
10% (STATE=‘NJ’)

RDBMS

11
90% Offload Ratio
SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’

100%

CELLSRV
10%

DISCARDED

90%

RDBMS

12
90% Offload Ratio
SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’

100% (input)

CELLSRV
10%
(output)

DISCARDED

90%
(overhead)

RDBMS

13
Offload Ratio
 What if we partition the table?
create table trans_data
(
...
state varchar2(2),
...
) partition by list (state)
(
...
partition NJ values ('NJ'),
partition NY values ('NY'),
...
);

14
0% Offload Ratio
SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’

100% (input)

Eliminated by Partition Pruning

CELLSRV
100%
(output)

NOTHING DISCARDED

0%
(overhead)

RDBMS

15
Cell Offload Efficiency (SQLMON)
SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’

C=1 −

𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆
𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑅𝐸𝐴𝐷_𝐵𝑌𝑇𝐸𝑆 + 𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑊𝑅𝐼𝑇𝐸_𝐵𝑌𝑇𝐸𝑆

→1−

OUTPUT
INPUT

 Efficiency

 Overhead

16
Data Selectivity
 Selective data – data SQL statement needs for the final
result
 Unselective data – data SQL statement has to go through
SQL

Input

Output

Data Selectivity

A

100GB

10GB

10%

B

10GB

10GB

100%

17
Data Selectivity and Exadata
 Data selective query beats data unselective query any day of the
week (all other things equal)
 Data unselective queries tend to benefit the most from the Exadata
Response Time %
SQL A Exadata
SQL A
SQL B Exadata
SQL B
0

10

20

30

40

Unselective Data

50

60

70

80

90

100

Selective Data

18
Exadata Design Disaster

The easiest way to archive high offload ratios is to make
all your SQLs to be very data unselective

19
The Year is 2001…

20
The Year is 2001…
“Buffer Cache Hit Ratio Tuning is
Rampant…”

21
The Year is 2001…
 Why a 99%+ Database Buffer Cache Hit Ratio is NOT Ok (*)
 Cary Millsap/Hotsos Enterprises Ltd.

(*) used here with Cary’s permission
22
The Year is 2001…
“Database buffer cache hit ratios are
useless!!!”

23
Buffer Cache Hit Ratio
 One of the major ratios used to tune databases

 Displayed on the “front page” of most database tools
(Quest Spotlight, Oracle OEM, etc.)
 Choose any hit ratio (why BCHR is useless):
http://www.oracledba.co.uk/tips/choose.htm
 It took 10+ years to deal with it

24
Bump Your Offload Ratio
If you’re still unconvinced…

25
Bump Your Offload Ratio
 Improves your offload ratio to 99%+ percent!!! (*)
--One time setup
create table bump_my_offload nocompress as
select rpad('x', 4000, 'x') x
from dual
connect by level <= 200000;
--Main Loop
begin
execute immediate 'alter session set parallel_degree_policy=manual';
execute immediate 'alter session set "_parallel_cluster_cache_policy"=adaptive';
execute immediate 'alter session set "_kcfis_storageidx_disabled"=true';
loop
for cur in (select /*+ parallel(16) */ * from bump_my_offload where x is null)
loop
null;
end loop;
end loop;
end;

(*) if you don’t archive 99%+ offload ratio simply run more
copies of the “Main Loop” in parallel
26
Limitations

27
Data Processing
SELECT STATE, STORE_ID, DATE_ID, SUM(AMOUNT), COUNT(DISTINCT CART_ID)
FROM TRANS_DATA
GROUP BY STATE, STORE_ID, DATE_ID

CPU

User I/O

Raw Data Processing

Aggregation
Processing

Raw Data Processing Exadata

28
Data Processing
SELECT STATE, STORE_ID, DATE_ID, SUM(AMOUNT), COUNT(DISTINCT CART_ID)
FROM TRANS_DATA
GROUP BY STATE, STORE_ID, DATE_ID

29
Trade-Offs

30
Trade-Offs
 In-Memory PQ
 Does not work with smart scans (no direct path reads)

 Segment-level checkpoints
 Can introduce significant overhead

 OLTP activity
 Often does not mix well with smart scans

 In-memory database option
 Not in offloading territory

31
Q&A
Email: afatkulin@enkitec.com
Blog: http://afatkulin.blogspot.com

32

More Related Content

Similar to Why You May Not Need Offloading

Performance Tuning Using oratop
Performance Tuning Using oratop Performance Tuning Using oratop
Performance Tuning Using oratop Sandesh Rao
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Alex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...Jim Czuprynski
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Peter Tröger
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratopSandesh Rao
 
Performance tuning
Performance tuningPerformance tuning
Performance tuningami111
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionTanel Poder
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Valeriy Kravchuk
 
Cluster Health Advisor (CHA) Deep Dive by Mark Scardina
Cluster Health Advisor (CHA)  Deep Dive by Mark ScardinaCluster Health Advisor (CHA)  Deep Dive by Mark Scardina
Cluster Health Advisor (CHA) Deep Dive by Mark ScardinaMarkus Michalewicz
 
Advanced tips of dbms statas
Advanced tips of dbms statasAdvanced tips of dbms statas
Advanced tips of dbms statasLouis liu
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestConnor McDonald
 
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionWhy is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionAjith Narayanan
 
RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)
RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)
RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)Kristofferson A
 

Similar to Why You May Not Need Offloading (20)

Performance Tuning Using oratop
Performance Tuning Using oratop Performance Tuning Using oratop
Performance Tuning Using oratop
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
Jdbc ja
Jdbc jaJdbc ja
Jdbc ja
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
Fast and Furious: Handling Edge Computing Data With Oracle 19c Fast Ingest an...
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratop
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)
 
Cluster Health Advisor (CHA) Deep Dive by Mark Scardina
Cluster Health Advisor (CHA)  Deep Dive by Mark ScardinaCluster Health Advisor (CHA)  Deep Dive by Mark Scardina
Cluster Health Advisor (CHA) Deep Dive by Mark Scardina
 
Advanced tips of dbms statas
Advanced tips of dbms statasAdvanced tips of dbms statas
Advanced tips of dbms statas
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
 
Long live to CMAN!
Long live to CMAN!Long live to CMAN!
Long live to CMAN!
 
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_questionWhy is my_oracle_e-biz_database_slow_a_million_dollar_question
Why is my_oracle_e-biz_database_slow_a_million_dollar_question
 
RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)
RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)
RMOUG2016 - Resource Management (the critical piece of the consolidation puzzle)
 

More from Enkitec

Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEXEnkitec
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014Enkitec
 
Engineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEngineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEnkitec
 
Think Exa!
Think Exa!Think Exa!
Think Exa!Enkitec
 
In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1Enkitec
 
Mini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingMini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingEnkitec
 
Profiling Oracle with GDB
Profiling Oracle with GDBProfiling Oracle with GDB
Profiling Oracle with GDBEnkitec
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the TradeEnkitec
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
SQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeSQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeEnkitec
 
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityEnkitec
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security PrimerEnkitec
 
How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?Enkitec
 
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Enkitec
 
Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Enkitec
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerEnkitec
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014Enkitec
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityEnkitec
 

More from Enkitec (20)

Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEX
 
Controlling execution plans 2014
Controlling execution plans   2014Controlling execution plans   2014
Controlling execution plans 2014
 
Engineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEngineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service Demonstration
 
Think Exa!
Think Exa!Think Exa!
Think Exa!
 
In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1In Search of Plan Stability - Part 1
In Search of Plan Stability - Part 1
 
Mini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingMini Session - Using GDB for Profiling
Mini Session - Using GDB for Profiling
 
Profiling Oracle with GDB
Profiling Oracle with GDBProfiling Oracle with GDB
Profiling Oracle with GDB
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
SQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeSQL Tuning Tools of the Trade
SQL Tuning Tools of the Trade
 
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security Primer
 
How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?
 
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
 
Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM Stability
 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 

Why You May Not Need Offloading

  • 1. Why You May Not Need Offloading Presented by: Alex Fatkulin Senior Consultant January 20, 2013
  • 2. Who am I ?  Senior Technical Consultant at Enkitec  12 years using Oracle  Clustered and HA solutions  Database Development and Design  Technical Reviewer  Blog at http://afatkulin.blogspot.com 3
  • 4. Sounds familiar? (tongue in cheek)  My SQL is slow but it’s offload ratio is 95%+  This just can’t be!  My SQL is slow and it must be because it has a low offload ratio  This ought to be it!  Offload ratio is the only thing to worry about  Nothing else matters! 5
  • 5. What is offload ratio?  The amount of work performed on the storage cells relative to the total amount of work 𝑊(𝐶𝐸𝐿𝐿) 𝑅= 𝑊 𝐶𝐸𝐿𝐿 + 𝑊(𝑅𝐷𝐵𝑀𝑆) 6
  • 6. I/O Saved (MOS)  MOS Doc ID 1438173.1 𝐼𝑂_𝑆𝐴𝑉𝐸𝐷 = 𝐼𝑂_𝐶𝐸𝐿𝐿_𝑂𝐹𝐹𝐿𝑂𝐴𝐷_𝐸𝐿𝐼𝐺𝐼𝐵𝐿𝐸_𝐵𝑌𝑇𝐸𝑆 − 𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆 𝐼𝑂_𝐶𝐸𝐿𝐿_𝑂𝐹𝐹𝐿𝑂𝐴𝐷_𝐸𝐿𝐼𝐺𝐼𝐵𝐿𝐸_𝐵𝑌𝑇𝐸𝑆 =1 − 𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆 𝐼𝑂_𝐶𝐸𝐿𝐿_𝑂𝐹𝐹𝐿𝑂𝐴𝐷_𝐸𝐿𝐼𝐺𝐼𝐵𝐿𝐸_𝐵𝑌𝑇𝐸𝑆  IO_INTERCONNECT_BYTES  Includes all types of I/O against any storage  Includes mirrored data  Compressed vs Uncompressed data 7
  • 7. Cell Offload Efficiency (SQLMON)  SQL Monitor C=1 − 𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆 𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑅𝐸𝐴𝐷_𝐵𝑌𝑇𝐸𝑆 + 𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑊𝑅𝐼𝑇𝐸_𝐵𝑌𝑇𝐸𝑆  Only considers data volumes 8
  • 8. Offload Ratio  Two SQL statements return the same data but have different plans and offload ratios SQL Statement Offload ratio A 90% B 0%  Which one is better? 9
  • 9. Offload Ratio  Two SQL statements return the same data but have different plans and offload ratios SQL Statement Offload ratio Scanned Returned A 90% 100GB 10GB B 0% 10GB 10GB  Using offload ratio alone is unreliable indicator for performance 10
  • 10. 90% Offload Ratio SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’ 100% CELLSRV 10% (STATE=‘NJ’) RDBMS 11
  • 11. 90% Offload Ratio SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’ 100% CELLSRV 10% DISCARDED 90% RDBMS 12
  • 12. 90% Offload Ratio SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’ 100% (input) CELLSRV 10% (output) DISCARDED 90% (overhead) RDBMS 13
  • 13. Offload Ratio  What if we partition the table? create table trans_data ( ... state varchar2(2), ... ) partition by list (state) ( ... partition NJ values ('NJ'), partition NY values ('NY'), ... ); 14
  • 14. 0% Offload Ratio SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’ 100% (input) Eliminated by Partition Pruning CELLSRV 100% (output) NOTHING DISCARDED 0% (overhead) RDBMS 15
  • 15. Cell Offload Efficiency (SQLMON) SELECT * FROM TRANS_DATA WHERE STATE=‘NJ’ C=1 − 𝐼𝑂_𝐼𝑁𝑇𝐸𝑅𝐶𝑂𝑁𝑁𝐸𝐶𝑇_𝐵𝑌𝑇𝐸𝑆 𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑅𝐸𝐴𝐷_𝐵𝑌𝑇𝐸𝑆 + 𝑃𝐻𝑌𝑆𝐼𝐶𝐴𝐿_𝑊𝑅𝐼𝑇𝐸_𝐵𝑌𝑇𝐸𝑆 →1− OUTPUT INPUT  Efficiency  Overhead 16
  • 16. Data Selectivity  Selective data – data SQL statement needs for the final result  Unselective data – data SQL statement has to go through SQL Input Output Data Selectivity A 100GB 10GB 10% B 10GB 10GB 100% 17
  • 17. Data Selectivity and Exadata  Data selective query beats data unselective query any day of the week (all other things equal)  Data unselective queries tend to benefit the most from the Exadata Response Time % SQL A Exadata SQL A SQL B Exadata SQL B 0 10 20 30 40 Unselective Data 50 60 70 80 90 100 Selective Data 18
  • 18. Exadata Design Disaster The easiest way to archive high offload ratios is to make all your SQLs to be very data unselective 19
  • 19. The Year is 2001… 20
  • 20. The Year is 2001… “Buffer Cache Hit Ratio Tuning is Rampant…” 21
  • 21. The Year is 2001…  Why a 99%+ Database Buffer Cache Hit Ratio is NOT Ok (*)  Cary Millsap/Hotsos Enterprises Ltd. (*) used here with Cary’s permission 22
  • 22. The Year is 2001… “Database buffer cache hit ratios are useless!!!” 23
  • 23. Buffer Cache Hit Ratio  One of the major ratios used to tune databases  Displayed on the “front page” of most database tools (Quest Spotlight, Oracle OEM, etc.)  Choose any hit ratio (why BCHR is useless): http://www.oracledba.co.uk/tips/choose.htm  It took 10+ years to deal with it 24
  • 24. Bump Your Offload Ratio If you’re still unconvinced… 25
  • 25. Bump Your Offload Ratio  Improves your offload ratio to 99%+ percent!!! (*) --One time setup create table bump_my_offload nocompress as select rpad('x', 4000, 'x') x from dual connect by level <= 200000; --Main Loop begin execute immediate 'alter session set parallel_degree_policy=manual'; execute immediate 'alter session set "_parallel_cluster_cache_policy"=adaptive'; execute immediate 'alter session set "_kcfis_storageidx_disabled"=true'; loop for cur in (select /*+ parallel(16) */ * from bump_my_offload where x is null) loop null; end loop; end loop; end; (*) if you don’t archive 99%+ offload ratio simply run more copies of the “Main Loop” in parallel 26
  • 27. Data Processing SELECT STATE, STORE_ID, DATE_ID, SUM(AMOUNT), COUNT(DISTINCT CART_ID) FROM TRANS_DATA GROUP BY STATE, STORE_ID, DATE_ID CPU User I/O Raw Data Processing Aggregation Processing Raw Data Processing Exadata 28
  • 28. Data Processing SELECT STATE, STORE_ID, DATE_ID, SUM(AMOUNT), COUNT(DISTINCT CART_ID) FROM TRANS_DATA GROUP BY STATE, STORE_ID, DATE_ID 29
  • 30. Trade-Offs  In-Memory PQ  Does not work with smart scans (no direct path reads)  Segment-level checkpoints  Can introduce significant overhead  OLTP activity  Often does not mix well with smart scans  In-memory database option  Not in offloading territory 31