SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
Simon Huang
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 

Mais procurados (20)

Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
Oracle - Checklist for performance issues
Oracle - Checklist for performance issuesOracle - Checklist for performance issues
Oracle - Checklist for performance issues
 
Capacity Planning
Capacity PlanningCapacity Planning
Capacity Planning
 
Oracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion EditionOracle RAC Internals - The Cache Fusion Edition
Oracle RAC Internals - The Cache Fusion Edition
 
SSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQLSSD Deployment Strategies for MySQL
SSD Deployment Strategies for MySQL
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
 
New Generation Oracle RAC Performance
New Generation Oracle RAC PerformanceNew Generation Oracle RAC Performance
New Generation Oracle RAC Performance
 
Oracle RAC features on Exadata
Oracle RAC features on ExadataOracle RAC features on Exadata
Oracle RAC features on Exadata
 
Basic oracle-database-administration
Basic oracle-database-administrationBasic oracle-database-administration
Basic oracle-database-administration
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLON
 
Database Cloud Services Office Hours : Oracle sharding hyperscale globally d...
Database Cloud Services Office Hours : Oracle sharding  hyperscale globally d...Database Cloud Services Office Hours : Oracle sharding  hyperscale globally d...
Database Cloud Services Office Hours : Oracle sharding hyperscale globally d...
 
Oracle Database in-Memory Overivew
Oracle Database in-Memory OverivewOracle Database in-Memory Overivew
Oracle Database in-Memory Overivew
 
Deep review of LMS process
Deep review of LMS processDeep review of LMS process
Deep review of LMS process
 
Dell server power edge
Dell server power edgeDell server power edge
Dell server power edge
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
 
Make Your Application “Oracle RAC Ready” & Test For It
Make Your Application “Oracle RAC Ready” & Test For ItMake Your Application “Oracle RAC Ready” & Test For It
Make Your Application “Oracle RAC Ready” & Test For It
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1
 
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
Optimize DR and Cloning with Logical Hostnames in Oracle E-Business Suite (OA...
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 

Destaque (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
 

Semelhante a Fatkulin hotsos 2014

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
 

Semelhante a 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
 

Mais de Enkitec

Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
Enkitec
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security Primer
Enkitec
 
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 Stability
Enkitec
 
Why You May Not Need Offloading
Why You May Not Need OffloadingWhy You May Not Need Offloading
Why You May Not Need Offloading
Enkitec
 
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
Enkitec
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
Enkitec
 
Enkitec Exadata Human Factor
Enkitec Exadata Human FactorEnkitec Exadata Human Factor
Enkitec Exadata Human Factor
Enkitec
 
About Multiblock Reads v4
About Multiblock Reads v4About Multiblock Reads v4
About Multiblock Reads v4
Enkitec
 

Mais de 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
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.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
 
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
 
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...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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, ...
 
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
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 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