SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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)
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Kürzlich hochgeladen (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

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