SlideShare a Scribd company logo
1 of 29
Leveraging In-Memory Storage to
Overcome Oracle PGA Memory Limits
March 5, 2014
Presented by: Alex Fatkulin
Senior Consultant
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
Data Growth and Processing
 Data Volumes UP
 Processing Power UP
 Database Design (in general) DOWN
5
Data Volume
Processing Power
Database Design
BetterWorse
6
How many people have systems with
more than 128G of RAM?
“640K” Problems
7
 Processing patterns change
 Things that didn’t matter before matter now
 Legacy RDBMS code vs 64-bit systems
 KIWI (Kill It With Iron)
PGA Memory
8
PGA Memory (Dedicated Server)
9
Sort AreaHash Area Bitmap Area
SQL Work Areas
Session Memory Private SQL Area
Process Memory
Query Execution Work Areas
10
Work Area Size
Manual Management Auto Management
hash_area_size
sort_area_size
bitmap_merge_area_size
create_bitmap_area_size
pga_aggregate_target
PGA Memory Limits
11
Manual Work Area Management
12
SQL> alter session set workarea_size_policy=manual;
Session altered
SQL> alter session set hash_area_size=4294967296; -- 4GB
alter session set hash_area_size=4294967296
ORA-02017: integer value required
 11.2.0.4 Linux x64
SQL> alter session set hash_area_size=2147483648; -- 2GB
alter session set hash_area_size=2147483648
ORA-02017: integer value required
SQL> alter session set hash_area_size=2147483647; -- 2GB - 1
Session altered
 32-bit Signed Integer Limit
Auto Work Area Management
13
SQL> alter system set pga_aggregate_target=1024g; -- 1TB
System altered
 11.2.0.4 Linux x64
 Where is the catch?
 PGA_AGGREGATE_TARGET
 _smm_max_size/_smm_max_size_static
 Maximum work area size per process (px/serial)
 _smm_px_max_size/_smm_px_max_size_static
 Maximum work area size per query (px)
 _pga_max_size
 Maximum PGA size per process (px/serial)
Auto Work Area Management
14
 PGA_AGGREGATE_TARGET 16M – 512M
0
100
200
300
400
500
600
16 32 64 128 256 512
pga_aggregate_target _smm_max_size _smm_px_max_size _pga_max_size
 _pga_max_size = 200M
 _smm_max_size[_static] = 20%
 _smm_px_max_size[_static] = 50%
Auto Work Area Management
15
 PGA_AGGREGATE_TARGET 1G – 10G
 _pga_max_size = 20%
 _smm_max_size[_static] = 10%
 _smm_px_max_size[_static] = 50%
0
2000
4000
6000
8000
10000
12000
pga_aggregate_target _smm_max_size _smm_px_max_size _pga_max_size
Auto Work Area Management
16
 PGA_AGGREGATE_TARGET 10G – 16G
 _pga_max_size = 2G
 _smm_max_size[_static] = 2G
 _smm_px_max_size[_static] = 50%
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
10240 10752 11264 11776 12288 12800 13312 13824 14336 14848 15360 15872 16384
pga_aggregate_target _smm_max_size _smm_px_max_size _pga_max_size
Auto Work Area Management
17
 PGA_AGGREGATE_TARGET >= 10G
 _smm_max_size[_static] = 1G (maximum value)
 _pga_max_size = 2G (maximum value)
 If you’re bumping into per process limits further rising
pga_aggregate_target will not help
Per Process Limit
18
 PGA_AGGREGATE_TARGET = 192G / DOP = 16
 PGA_AGGREGATE_TARGET = 512G / DOP = 16
Per Process Limit
19
 PGA_AGGREGATE_TARGET = 192G / DOP = 16
 PGA_AGGREGATE_TARGET = 512G / DOP = 16
 _pga_max_size * DOP
Run With Higher DOP?
20
 Exadata X3-8
 2TB RAM (per node)
 80 CPU cores (per node)
 PGA_AGGREGATE_TARGET = 1536G
 Would require at least DOP 768 (_pga_max_size)
 9.6x core count
 Concurrency issues
 Manageability issues
 PX data distribution/algorithm issues
Run With Higher DOP?
21
 DOP vs CPU Cores Used
5 (spill) 8 (spill)
64 (no spill)
0
16
32
48
64
16 32 64
CPUCoresUsed
DOP
Run With Higher DOP?
22
 PX Algorithm Issues (ex.: median function)
Play With Underscores?
23
 MOS Doc ID 453540.1
 Allows _smm_max_size=2097151
 Allows _pga_max_size > 2GB with patch 17951233
 Can get 4G per process limit
 Can get > 4G per process limit
 /proc/sys/vm/max_map_count (OS page count)
 _realfree_heap_pagesize_hint (allocator page size)
 Weird behavior and likely not fully supported for work
areas (MOS Doc ID 453540.1)
Radically Improve TEMP I/O?
24
 TEMP I/O (in general)
 Doesn’t need redundancy
 Doesn’t need persistency
 Doesn’t need recoverability
 In-Memory FS (tmpfs, etc.)
 SAN/NAS LUN with write-back cache
Linux tmpfs (via loop device)
25
 10.1B rows / 416G HCC (QUERY HIGH)
SELECT /*+ parallel(t,16) */
CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D
FROM TRANS T
WHERE DATE_ID between to_date('01012012', 'ddmmyyyy') and to_date('31122013', 'ddmmyyyy')
GROUP BY CUST_ID, DATE_ID;
Exadata X3-8 TEMP
tmpfs TEMP
 13.8x faster TEMP I/O (237G)
Linux tmpfs (via loop device)
26
 10.1B rows / 416G HCC (QUERY HIGH)
SELECT /*+ parallel(t,16) */
CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D
FROM TRANS T
WHERE DATE_ID between to_date('01012012', 'ddmmyyyy') and to_date('31122013', 'ddmmyyyy')
GROUP BY CUST_ID, DATE_ID;
ZFSSA (Infiniband SRP)
27
 7.3B rows / 300G HCC (QUERY HIGH)
SELECT /*+ parallel(t,32) */
CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D
FROM TRANS T
GROUP BY CUST_ID, DATE_ID;
Exadata X3-8 TEMP
ZFSSA TEMP
(write-back cache)
 64.3x faster TEMP I/O (141G)
ZFSSA (Infiniband SRP)
28
 7.3B rows / 300G HCC (QUERY HIGH)
SELECT /*+ parallel(t,32) */
CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D
FROM TRANS T
GROUP BY CUST_ID, DATE_ID;
Summary
29
 Remember about per process limits
 Larger PGA_AGGREGATE_TARGET may do nothing
 Balance PGA/DOP/CPU
 It’s possible to increase TEMP I/O performance by 10x-
50x and more
 Oracle PGA code does not fully embrace 64-bit systems
at the moment
Q & A
Email: afatkulin@enkitec.com
Blog: http://afatkulin.blogspot.com
30

More Related Content

What's hot

IBM Spectrum Scale Authentication for Protocols
IBM Spectrum Scale Authentication for ProtocolsIBM Spectrum Scale Authentication for Protocols
IBM Spectrum Scale Authentication for ProtocolsSandeep Patil
 
Comment securiser votre annuaire Active Directory contre les attaques de malw...
Comment securiser votre annuaire Active Directory contre les attaques de malw...Comment securiser votre annuaire Active Directory contre les attaques de malw...
Comment securiser votre annuaire Active Directory contre les attaques de malw...Sylvain Cortes
 
Audio codes presentation
Audio codes presentationAudio codes presentation
Audio codes presentationTed Wentzel
 
Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...
Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...
Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...Alphorm
 
Object storage의 이해와 활용
Object storage의 이해와 활용Object storage의 이해와 활용
Object storage의 이해와 활용Seoro Kim
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New GenerationAnil Nair
 
AIOps: Anomalous Span Detection in Distributed Traces Using Deep Learning
AIOps: Anomalous Span Detection in Distributed Traces Using Deep LearningAIOps: Anomalous Span Detection in Distributed Traces Using Deep Learning
AIOps: Anomalous Span Detection in Distributed Traces Using Deep LearningJorge Cardoso
 
How to Backup to Google Drive with CloudBerry Backup
How to Backup to Google Drive with CloudBerry Backup How to Backup to Google Drive with CloudBerry Backup
How to Backup to Google Drive with CloudBerry Backup Alexander Negrash
 
AWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep DiveAWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep DiveAmazon Web Services Korea
 
Hacking Cisco Networks and Countermeasures
Hacking Cisco Networks and CountermeasuresHacking Cisco Networks and Countermeasures
Hacking Cisco Networks and Countermeasuresdkaya
 
An Introduction To Server Virtualisation
An Introduction To Server VirtualisationAn Introduction To Server Virtualisation
An Introduction To Server VirtualisationAlan McSweeney
 
Cloud Computing Standards and Use Cases (Robert Grossman) 09-v8p
Cloud Computing Standards and Use Cases (Robert Grossman) 09-v8pCloud Computing Standards and Use Cases (Robert Grossman) 09-v8p
Cloud Computing Standards and Use Cases (Robert Grossman) 09-v8pRobert Grossman
 
Putting Firepower into the Next Generation Firewall
Putting Firepower into the Next Generation FirewallPutting Firepower into the Next Generation Firewall
Putting Firepower into the Next Generation FirewallCisco Canada
 
MCAS High Level Architecture May 2021
MCAS High Level Architecture May 2021MCAS High Level Architecture May 2021
MCAS High Level Architecture May 2021Matt Soseman
 
Exadata_X10M-Hardware-Overview.pdf
Exadata_X10M-Hardware-Overview.pdfExadata_X10M-Hardware-Overview.pdf
Exadata_X10M-Hardware-Overview.pdfKoko842772
 

What's hot (20)

IBM Spectrum Scale Authentication for Protocols
IBM Spectrum Scale Authentication for ProtocolsIBM Spectrum Scale Authentication for Protocols
IBM Spectrum Scale Authentication for Protocols
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
Comment securiser votre annuaire Active Directory contre les attaques de malw...
Comment securiser votre annuaire Active Directory contre les attaques de malw...Comment securiser votre annuaire Active Directory contre les attaques de malw...
Comment securiser votre annuaire Active Directory contre les attaques de malw...
 
Microsoft System center
Microsoft System centerMicrosoft System center
Microsoft System center
 
Audio codes presentation
Audio codes presentationAudio codes presentation
Audio codes presentation
 
Storage basics
Storage basicsStorage basics
Storage basics
 
Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...
Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...
Alphorm.com Formation Windows Server 2019 : Installation et Configuration de ...
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Object storage의 이해와 활용
Object storage의 이해와 활용Object storage의 이해와 활용
Object storage의 이해와 활용
 
Oracle RAC - New Generation
Oracle RAC - New GenerationOracle RAC - New Generation
Oracle RAC - New Generation
 
AIOps: Anomalous Span Detection in Distributed Traces Using Deep Learning
AIOps: Anomalous Span Detection in Distributed Traces Using Deep LearningAIOps: Anomalous Span Detection in Distributed Traces Using Deep Learning
AIOps: Anomalous Span Detection in Distributed Traces Using Deep Learning
 
How to Backup to Google Drive with CloudBerry Backup
How to Backup to Google Drive with CloudBerry Backup How to Backup to Google Drive with CloudBerry Backup
How to Backup to Google Drive with CloudBerry Backup
 
AWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep DiveAWS 9월 웨비나 | Amazon Aurora Deep Dive
AWS 9월 웨비나 | Amazon Aurora Deep Dive
 
Hacking Cisco Networks and Countermeasures
Hacking Cisco Networks and CountermeasuresHacking Cisco Networks and Countermeasures
Hacking Cisco Networks and Countermeasures
 
An Introduction To Server Virtualisation
An Introduction To Server VirtualisationAn Introduction To Server Virtualisation
An Introduction To Server Virtualisation
 
Cloud Computing Standards and Use Cases (Robert Grossman) 09-v8p
Cloud Computing Standards and Use Cases (Robert Grossman) 09-v8pCloud Computing Standards and Use Cases (Robert Grossman) 09-v8p
Cloud Computing Standards and Use Cases (Robert Grossman) 09-v8p
 
Putting Firepower into the Next Generation Firewall
Putting Firepower into the Next Generation FirewallPutting Firepower into the Next Generation Firewall
Putting Firepower into the Next Generation Firewall
 
Oracle RAC 12c Overview
Oracle RAC 12c OverviewOracle RAC 12c Overview
Oracle RAC 12c Overview
 
MCAS High Level Architecture May 2021
MCAS High Level Architecture May 2021MCAS High Level Architecture May 2021
MCAS High Level Architecture May 2021
 
Exadata_X10M-Hardware-Overview.pdf
Exadata_X10M-Hardware-Overview.pdfExadata_X10M-Hardware-Overview.pdf
Exadata_X10M-Hardware-Overview.pdf
 

Viewers also liked

Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEXEnkitec
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerEnkitec
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
 
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
 
Christo kutrovsky oracle rac solving common scalability problems
Christo kutrovsky   oracle rac solving common scalability problemsChristo kutrovsky   oracle rac solving common scalability problems
Christo kutrovsky oracle rac solving common scalability problemsChristo Kutrovsky
 

Viewers also liked (7)

Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEX
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
 
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
 
Christo kutrovsky oracle rac solving common scalability problems
Christo kutrovsky   oracle rac solving common scalability problemsChristo kutrovsky   oracle rac solving common scalability problems
Christo kutrovsky oracle rac solving common scalability problems
 

Similar to Fatkulin hotsos 2014

Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Alexey Lesovsky
 
Toronto meetup 20190917
Toronto meetup 20190917Toronto meetup 20190917
Toronto meetup 20190917Bill Liu
 
How to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishHow to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishKaliop-slide
 
Performance tuning ColumnStore
Performance tuning ColumnStorePerformance tuning ColumnStore
Performance tuning ColumnStoreMariaDB plc
 
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
 
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New FeaturesAmazon Web Services
 
Advanced equal logic customer presentation
Advanced equal logic customer presentationAdvanced equal logic customer presentation
Advanced equal logic customer presentationallardb
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deploymentsOdoo
 
z/VM Performance Analysis
z/VM Performance Analysisz/VM Performance Analysis
z/VM Performance AnalysisRodrigo Campos
 
Beyond Best Practice: Grid Computing in the Modern World
Beyond Best Practice: Grid Computing in the Modern World Beyond Best Practice: Grid Computing in the Modern World
Beyond Best Practice: Grid Computing in the Modern World ThotWave
 
Are your ready for in memory applications?
Are your ready for in memory applications?Are your ready for in memory applications?
Are your ready for in memory applications?G2MCommunications
 
Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection HeroTier1app
 
Q4.11: Introduction to eMMC
Q4.11: Introduction to eMMCQ4.11: Introduction to eMMC
Q4.11: Introduction to eMMCLinaro
 
Tracing and profiling my sql (percona live europe 2019) draft_1
Tracing and profiling my sql (percona live europe 2019) draft_1Tracing and profiling my sql (percona live europe 2019) draft_1
Tracing and profiling my sql (percona live europe 2019) draft_1Valerii Kravchuk
 
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...Alexander Dymo
 
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center ZurichData Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center ZurichRomeo Kienzler
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceTier1app
 
Become a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsBecome a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsTier1app
 
Full scan frenzy at amadeus
Full scan frenzy at amadeusFull scan frenzy at amadeus
Full scan frenzy at amadeusMongoDB
 

Similar to Fatkulin hotsos 2014 (20)

Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 
Toronto meetup 20190917
Toronto meetup 20190917Toronto meetup 20190917
Toronto meetup 20190917
 
How to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishHow to deploy & optimize eZ Publish
How to deploy & optimize eZ Publish
 
Performance tuning ColumnStore
Performance tuning ColumnStorePerformance tuning ColumnStore
Performance tuning ColumnStore
 
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)
 
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
 
Advanced equal logic customer presentation
Advanced equal logic customer presentationAdvanced equal logic customer presentation
Advanced equal logic customer presentation
 
Improving the performance of Odoo deployments
Improving the performance of Odoo deploymentsImproving the performance of Odoo deployments
Improving the performance of Odoo deployments
 
z/VM Performance Analysis
z/VM Performance Analysisz/VM Performance Analysis
z/VM Performance Analysis
 
11g R2
11g R211g R2
11g R2
 
Beyond Best Practice: Grid Computing in the Modern World
Beyond Best Practice: Grid Computing in the Modern World Beyond Best Practice: Grid Computing in the Modern World
Beyond Best Practice: Grid Computing in the Modern World
 
Are your ready for in memory applications?
Are your ready for in memory applications?Are your ready for in memory applications?
Are your ready for in memory applications?
 
Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection Hero
 
Q4.11: Introduction to eMMC
Q4.11: Introduction to eMMCQ4.11: Introduction to eMMC
Q4.11: Introduction to eMMC
 
Tracing and profiling my sql (percona live europe 2019) draft_1
Tracing and profiling my sql (percona live europe 2019) draft_1Tracing and profiling my sql (percona live europe 2019) draft_1
Tracing and profiling my sql (percona live europe 2019) draft_1
 
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
Alexander Dymo - RailsConf 2014 - Improve performance: Optimize Memory and Up...
 
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center ZurichData Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
Data Science Connect, July 22nd 2014 @IBM Innovation Center Zurich
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo Conference
 
Become a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsBecome a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day Devops
 
Full scan frenzy at amadeus
Full scan frenzy at amadeusFull scan frenzy at amadeus
Full scan frenzy at amadeus
 

More from Enkitec

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
 
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
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityEnkitec
 
Why You May Not Need Offloading
Why You May Not Need OffloadingWhy You May Not Need Offloading
Why You May Not Need OffloadingEnkitec
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXEnkitec
 
Creating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEXCreating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEXEnkitec
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New FeaturesEnkitec
 
Enkitec Exadata Human Factor
Enkitec Exadata Human FactorEnkitec Exadata Human Factor
Enkitec Exadata Human FactorEnkitec
 
About Multiblock Reads v4
About Multiblock Reads v4About Multiblock Reads v4
About Multiblock Reads v4Enkitec
 

More from Enkitec (20)

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
 
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)
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM Stability
 
Why You May Not Need Offloading
Why You May Not Need OffloadingWhy You May Not Need Offloading
Why You May Not Need Offloading
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
 
Creating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEXCreating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEX
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
 
Enkitec Exadata Human Factor
Enkitec Exadata Human FactorEnkitec Exadata Human Factor
Enkitec Exadata Human Factor
 
About Multiblock Reads v4
About Multiblock Reads v4About Multiblock Reads v4
About Multiblock Reads v4
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Fatkulin hotsos 2014

  • 1. Leveraging In-Memory Storage to Overcome Oracle PGA Memory Limits March 5, 2014 Presented by: Alex Fatkulin Senior Consultant
  • 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. Data Growth and Processing  Data Volumes UP  Processing Power UP  Database Design (in general) DOWN 5 Data Volume Processing Power Database Design BetterWorse
  • 5. 6 How many people have systems with more than 128G of RAM?
  • 6. “640K” Problems 7  Processing patterns change  Things that didn’t matter before matter now  Legacy RDBMS code vs 64-bit systems  KIWI (Kill It With Iron)
  • 8. PGA Memory (Dedicated Server) 9 Sort AreaHash Area Bitmap Area SQL Work Areas Session Memory Private SQL Area Process Memory
  • 9. Query Execution Work Areas 10 Work Area Size Manual Management Auto Management hash_area_size sort_area_size bitmap_merge_area_size create_bitmap_area_size pga_aggregate_target
  • 11. Manual Work Area Management 12 SQL> alter session set workarea_size_policy=manual; Session altered SQL> alter session set hash_area_size=4294967296; -- 4GB alter session set hash_area_size=4294967296 ORA-02017: integer value required  11.2.0.4 Linux x64 SQL> alter session set hash_area_size=2147483648; -- 2GB alter session set hash_area_size=2147483648 ORA-02017: integer value required SQL> alter session set hash_area_size=2147483647; -- 2GB - 1 Session altered  32-bit Signed Integer Limit
  • 12. Auto Work Area Management 13 SQL> alter system set pga_aggregate_target=1024g; -- 1TB System altered  11.2.0.4 Linux x64  Where is the catch?  PGA_AGGREGATE_TARGET  _smm_max_size/_smm_max_size_static  Maximum work area size per process (px/serial)  _smm_px_max_size/_smm_px_max_size_static  Maximum work area size per query (px)  _pga_max_size  Maximum PGA size per process (px/serial)
  • 13. Auto Work Area Management 14  PGA_AGGREGATE_TARGET 16M – 512M 0 100 200 300 400 500 600 16 32 64 128 256 512 pga_aggregate_target _smm_max_size _smm_px_max_size _pga_max_size  _pga_max_size = 200M  _smm_max_size[_static] = 20%  _smm_px_max_size[_static] = 50%
  • 14. Auto Work Area Management 15  PGA_AGGREGATE_TARGET 1G – 10G  _pga_max_size = 20%  _smm_max_size[_static] = 10%  _smm_px_max_size[_static] = 50% 0 2000 4000 6000 8000 10000 12000 pga_aggregate_target _smm_max_size _smm_px_max_size _pga_max_size
  • 15. Auto Work Area Management 16  PGA_AGGREGATE_TARGET 10G – 16G  _pga_max_size = 2G  _smm_max_size[_static] = 2G  _smm_px_max_size[_static] = 50% 0 2000 4000 6000 8000 10000 12000 14000 16000 18000 10240 10752 11264 11776 12288 12800 13312 13824 14336 14848 15360 15872 16384 pga_aggregate_target _smm_max_size _smm_px_max_size _pga_max_size
  • 16. Auto Work Area Management 17  PGA_AGGREGATE_TARGET >= 10G  _smm_max_size[_static] = 1G (maximum value)  _pga_max_size = 2G (maximum value)  If you’re bumping into per process limits further rising pga_aggregate_target will not help
  • 17. Per Process Limit 18  PGA_AGGREGATE_TARGET = 192G / DOP = 16  PGA_AGGREGATE_TARGET = 512G / DOP = 16
  • 18. Per Process Limit 19  PGA_AGGREGATE_TARGET = 192G / DOP = 16  PGA_AGGREGATE_TARGET = 512G / DOP = 16  _pga_max_size * DOP
  • 19. Run With Higher DOP? 20  Exadata X3-8  2TB RAM (per node)  80 CPU cores (per node)  PGA_AGGREGATE_TARGET = 1536G  Would require at least DOP 768 (_pga_max_size)  9.6x core count  Concurrency issues  Manageability issues  PX data distribution/algorithm issues
  • 20. Run With Higher DOP? 21  DOP vs CPU Cores Used 5 (spill) 8 (spill) 64 (no spill) 0 16 32 48 64 16 32 64 CPUCoresUsed DOP
  • 21. Run With Higher DOP? 22  PX Algorithm Issues (ex.: median function)
  • 22. Play With Underscores? 23  MOS Doc ID 453540.1  Allows _smm_max_size=2097151  Allows _pga_max_size > 2GB with patch 17951233  Can get 4G per process limit  Can get > 4G per process limit  /proc/sys/vm/max_map_count (OS page count)  _realfree_heap_pagesize_hint (allocator page size)  Weird behavior and likely not fully supported for work areas (MOS Doc ID 453540.1)
  • 23. Radically Improve TEMP I/O? 24  TEMP I/O (in general)  Doesn’t need redundancy  Doesn’t need persistency  Doesn’t need recoverability  In-Memory FS (tmpfs, etc.)  SAN/NAS LUN with write-back cache
  • 24. Linux tmpfs (via loop device) 25  10.1B rows / 416G HCC (QUERY HIGH) SELECT /*+ parallel(t,16) */ CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D FROM TRANS T WHERE DATE_ID between to_date('01012012', 'ddmmyyyy') and to_date('31122013', 'ddmmyyyy') GROUP BY CUST_ID, DATE_ID; Exadata X3-8 TEMP tmpfs TEMP  13.8x faster TEMP I/O (237G)
  • 25. Linux tmpfs (via loop device) 26  10.1B rows / 416G HCC (QUERY HIGH) SELECT /*+ parallel(t,16) */ CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D FROM TRANS T WHERE DATE_ID between to_date('01012012', 'ddmmyyyy') and to_date('31122013', 'ddmmyyyy') GROUP BY CUST_ID, DATE_ID;
  • 26. ZFSSA (Infiniband SRP) 27  7.3B rows / 300G HCC (QUERY HIGH) SELECT /*+ parallel(t,32) */ CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D FROM TRANS T GROUP BY CUST_ID, DATE_ID; Exadata X3-8 TEMP ZFSSA TEMP (write-back cache)  64.3x faster TEMP I/O (141G)
  • 27. ZFSSA (Infiniband SRP) 28  7.3B rows / 300G HCC (QUERY HIGH) SELECT /*+ parallel(t,32) */ CUST_ID, DATE_ID, COUNT(DISTINCT STORE_ID) D FROM TRANS T GROUP BY CUST_ID, DATE_ID;
  • 28. Summary 29  Remember about per process limits  Larger PGA_AGGREGATE_TARGET may do nothing  Balance PGA/DOP/CPU  It’s possible to increase TEMP I/O performance by 10x- 50x and more  Oracle PGA code does not fully embrace 64-bit systems at the moment
  • 29. Q & A Email: afatkulin@enkitec.com Blog: http://afatkulin.blogspot.com 30