SlideShare una empresa de Scribd logo
1 de 34
Thanks for the Memory Guy Harrison Director,  Melbourne R&D  guy.harrison@quest.com www.guyharrison.net
Introductions Buy Quest Products
Human memory is complex  Short Term Sensory Store: ~ 1 second uncompressed raw memory Working memory:  Limited capacity, requires attention  Long term memory: physically stored in brain structure; large capacity; indexed strangely Beyond Bullets Points: By: Cliff Atkinson
Oracle memory is much simpler ,[object Object]
PGA is used for program working memory such as sorting and hashing
Other areas are less performance critical,[object Object]
What consumes PGA memory Sorts: ORDER BY  SORT-MERGE JOIN UNION, INTERSECT, MINUS Pre-10GR2 GROUP BY , DISTINCT Analytic functions: OVER(), LEAD(), LAG(), etc Hash Operations: Hash join Hash GROUP BY, DISTINCT PL/SQL variables Collections BULK COLLECT Parameter passing without NOCOPY
PGA Aggregate Target and session memory
Optimal, one-pass, multi-pass Multi-pass Single Pass Optimal
Sort merge and hash joins
Estimated SQL memory
Actual SQL Memory
PGA advice - manual
PGA advice - OEM
PGA and Sorts – Spotlight on Oracle
Opting out of PGA Aggregate Target Default workarea sizing policies only allow for a session to get 10-20% of the PGA If a single large sort is in progress, it makes sense to “opt out” of automatic workarea sizing
Shared Memory
Modified LRU mechanism  Oracle Session Buffer Cake Buffer Cache
Modified LRU mechanism: Table Scans  Oracle Session Buffer Cake Buffer Cache
Impact of direct path IO http://guyh.textdriven.com/OPSGSamples/Ch18/temporary_direct.sql
The buffer cache “hit rate”  http://guyh.textdriven.com/OPSGSamples/Ch18/hit_rate.sql
Multiple buffer pools
Buffer Cache advisory: manual
Buffer cache advisory: OEM
Automatic Shared Memory management (ASMM)	 Default in 10g and recommended (with caveats): Set Minimum values for key pools (buffer pools, shared pool) Manually size non-default pools using V$DB_CACHE_ADVICE Monitor for memory starvation Monitor for memory thrashing  Waits on “SGA: allocation forcing component growth”
Memory starvation and thrashing
Optimizing overall memory Optimizing between PGA and SGA are often more significant than allocating within each area In 10g optimization is difficult: Compare PGA and Buffer Cache  advisories Adjust based on IO types (direct read temp vs. physical reads) In 11g can use Automatic Memory Management  Risk of thrashing and starvation is greater than with ASMM Set minimum values for all pools Manually configure non-default buffer pools
Worst case scenario Trivial memory allocations from PL/SQL programs can steal vital memory from buffer cache Situation can become worse if MTS is enabled Setting minimum values is virtually mandatory
Spotlight on Oracle memory management
Spotlight on Oracle memory management
11g Result Set Cache Can provide massive improvements for expensive queries on static tables In memory dynamic materialized view?
Result set cache Caveats: Single latch on modifications Any modification to a dependent table flushes the result sets  Can select statements only at the table level or by inserting a hint Bottom line: Limited effectiveness Unique candidate SQLs must be low frequency Tables must be static
Things we didn’t talk about  Shared pool Redo buffer Large Pool Flashback buffer
Key take aways Don’t emphasize buffer cache tuning at the expense of PGA Consider opting out of PGA Aggregate Target for large sorts ASMM and ASM are fine, but set minimums for important memory pools  Result set cache is promising, but right now is of limited applicability

Más contenido relacionado

Destacado

Performensation Blog Articles Jan - June 2011
Performensation Blog Articles Jan - June 2011Performensation Blog Articles Jan - June 2011
Performensation Blog Articles Jan - June 2011PERFORMENSATION
 
Il Re e l' Imperatore
Il Re e l' ImperatoreIl Re e l' Imperatore
Il Re e l' Imperatorepulcino85
 
United Teak International
United Teak InternationalUnited Teak International
United Teak InternationalMax Kuling
 
Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008
Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008
Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008guestd9ddd7b
 
How to Turn Your Website into a Sales funnel
How to Turn Your Website into a Sales funnelHow to Turn Your Website into a Sales funnel
How to Turn Your Website into a Sales funnelJason Rudland
 
Sunday Streets Bpag Presentation 1
Sunday Streets   Bpag Presentation 1Sunday Streets   Bpag Presentation 1
Sunday Streets Bpag Presentation 1gcantori
 
Lesson 15 When Where To Show Your Ads
Lesson 15 When Where To Show Your AdsLesson 15 When Where To Show Your Ads
Lesson 15 When Where To Show Your AdsJim Jansen
 
Adventures in freemium
Adventures in freemiumAdventures in freemium
Adventures in freemiumNavin Ganeshan
 
Book Places in the Digital Age
Book Places in the Digital AgeBook Places in the Digital Age
Book Places in the Digital AgePenn State Press
 
Pró-Labore - Como aumentar o seu
Pró-Labore - Como aumentar o seuPró-Labore - Como aumentar o seu
Pró-Labore - Como aumentar o seuPrestus®
 
I luv hongkong行程终极篇
I luv hongkong行程终极篇I luv hongkong行程终极篇
I luv hongkong行程终极篇CHIN HUILING
 
Thefarm n1 15.30 p-guzman2013
Thefarm n1 15.30 p-guzman2013Thefarm n1 15.30 p-guzman2013
Thefarm n1 15.30 p-guzman2013Patricia Guzman
 
Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723PERFORMENSATION
 
Lesson 13 Writing Good Ads 02
Lesson 13 Writing Good Ads 02Lesson 13 Writing Good Ads 02
Lesson 13 Writing Good Ads 02Jim Jansen
 
Sustainable Suburbs: From Drivable Suburbanism to Walkable Urbanism
Sustainable Suburbs: From Drivable Suburbanism to Walkable UrbanismSustainable Suburbs: From Drivable Suburbanism to Walkable Urbanism
Sustainable Suburbs: From Drivable Suburbanism to Walkable UrbanismOHM Advisors
 
Jenny, Katerina And Arynda
Jenny, Katerina And AryndaJenny, Katerina And Arynda
Jenny, Katerina And Aryndakaterinawsy
 
A Paradigm Shift In How We Think About Education Facilities
A Paradigm Shift In How We Think About Education FacilitiesA Paradigm Shift In How We Think About Education Facilities
A Paradigm Shift In How We Think About Education FacilitiesOHM Advisors
 

Destacado (20)

Performensation Blog Articles Jan - June 2011
Performensation Blog Articles Jan - June 2011Performensation Blog Articles Jan - June 2011
Performensation Blog Articles Jan - June 2011
 
Il Re e l' Imperatore
Il Re e l' ImperatoreIl Re e l' Imperatore
Il Re e l' Imperatore
 
United Teak International
United Teak InternationalUnited Teak International
United Teak International
 
Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008
Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008
Danh SáCh HọC Sinh YếU Thi LạI NăM HọC 2008
 
How to Turn Your Website into a Sales funnel
How to Turn Your Website into a Sales funnelHow to Turn Your Website into a Sales funnel
How to Turn Your Website into a Sales funnel
 
Bni 2013 presentation
Bni 2013 presentationBni 2013 presentation
Bni 2013 presentation
 
Sunday Streets Bpag Presentation 1
Sunday Streets   Bpag Presentation 1Sunday Streets   Bpag Presentation 1
Sunday Streets Bpag Presentation 1
 
Lesson 15 When Where To Show Your Ads
Lesson 15 When Where To Show Your AdsLesson 15 When Where To Show Your Ads
Lesson 15 When Where To Show Your Ads
 
Adventures in freemium
Adventures in freemiumAdventures in freemium
Adventures in freemium
 
Book Places in the Digital Age
Book Places in the Digital AgeBook Places in the Digital Age
Book Places in the Digital Age
 
Pró-Labore - Como aumentar o seu
Pró-Labore - Como aumentar o seuPró-Labore - Como aumentar o seu
Pró-Labore - Como aumentar o seu
 
Xna Demo.Ppt
Xna Demo.PptXna Demo.Ppt
Xna Demo.Ppt
 
I luv hongkong行程终极篇
I luv hongkong行程终极篇I luv hongkong行程终极篇
I luv hongkong行程终极篇
 
Thefarm n1 15.30 p-guzman2013
Thefarm n1 15.30 p-guzman2013Thefarm n1 15.30 p-guzman2013
Thefarm n1 15.30 p-guzman2013
 
Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723Supplemental Info: Say on Pay and Dodd Frank 20100723
Supplemental Info: Say on Pay and Dodd Frank 20100723
 
Lesson 13 Writing Good Ads 02
Lesson 13 Writing Good Ads 02Lesson 13 Writing Good Ads 02
Lesson 13 Writing Good Ads 02
 
Sustainable Suburbs: From Drivable Suburbanism to Walkable Urbanism
Sustainable Suburbs: From Drivable Suburbanism to Walkable UrbanismSustainable Suburbs: From Drivable Suburbanism to Walkable Urbanism
Sustainable Suburbs: From Drivable Suburbanism to Walkable Urbanism
 
Jenny, Katerina And Arynda
Jenny, Katerina And AryndaJenny, Katerina And Arynda
Jenny, Katerina And Arynda
 
我用Django做页游
我用Django做页游我用Django做页游
我用Django做页游
 
A Paradigm Shift In How We Think About Education Facilities
A Paradigm Shift In How We Think About Education FacilitiesA Paradigm Shift In How We Think About Education Facilities
A Paradigm Shift In How We Think About Education Facilities
 

Similar a Thanks for the Memory: A Guide to Optimizing Oracle Database Memory

A4 oracle's application engineered storage your application advantage
A4   oracle's application engineered storage your application advantageA4   oracle's application engineered storage your application advantage
A4 oracle's application engineered storage your application advantageDr. Wilfred Lin (Ph.D.)
 
The benefits of IBM FlashSystems
The benefits of IBM FlashSystemsThe benefits of IBM FlashSystems
The benefits of IBM FlashSystemsLuca Comparini
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQDon Brizendine
 
Introduction to Memoria
Introduction to MemoriaIntroduction to Memoria
Introduction to MemoriaVictor Smirnov
 
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...Guy Harrison
 
Share point 2013 distributed cache
Share point 2013 distributed cacheShare point 2013 distributed cache
Share point 2013 distributed cacheMichael Nokhamzon
 
What is the Oracle Database Buffer Cache
What is the Oracle Database Buffer CacheWhat is the Oracle Database Buffer Cache
What is the Oracle Database Buffer CacheRemote DBA Services
 
SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3UniFabric
 
My sql innovation work -innosql
My sql innovation work -innosqlMy sql innovation work -innosql
My sql innovation work -innosqlthinkinlamp
 
11g r2 flashcache_Tips
11g r2 flashcache_Tips11g r2 flashcache_Tips
11g r2 flashcache_TipsLouis liu
 
Optimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardwareOptimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardwareIndicThreads
 
Ceph Performance: Projects Leading up to Jewel
Ceph Performance: Projects Leading up to JewelCeph Performance: Projects Leading up to Jewel
Ceph Performance: Projects Leading up to JewelColleen Corrice
 
Ceph Performance: Projects Leading Up to Jewel
Ceph Performance: Projects Leading Up to JewelCeph Performance: Projects Leading Up to Jewel
Ceph Performance: Projects Leading Up to JewelRed_Hat_Storage
 
Zarafa Scaling & Performance
Zarafa Scaling & PerformanceZarafa Scaling & Performance
Zarafa Scaling & PerformanceZarafa
 
A novel method to extend flash memory lifetime in flash based dbms
A novel method to extend flash memory lifetime in flash based dbmsA novel method to extend flash memory lifetime in flash based dbms
A novel method to extend flash memory lifetime in flash based dbmsZhichao Liang
 

Similar a Thanks for the Memory: A Guide to Optimizing Oracle Database Memory (20)

A4 oracle's application engineered storage your application advantage
A4   oracle's application engineered storage your application advantageA4   oracle's application engineered storage your application advantage
A4 oracle's application engineered storage your application advantage
 
Frb Briefing Database
Frb Briefing DatabaseFrb Briefing Database
Frb Briefing Database
 
Les 13 memory
Les 13 memoryLes 13 memory
Les 13 memory
 
The benefits of IBM FlashSystems
The benefits of IBM FlashSystemsThe benefits of IBM FlashSystems
The benefits of IBM FlashSystems
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQ
 
Introduction to Memoria
Introduction to MemoriaIntroduction to Memoria
Introduction to Memoria
 
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
 
Share point 2013 distributed cache
Share point 2013 distributed cacheShare point 2013 distributed cache
Share point 2013 distributed cache
 
What is the Oracle Database Buffer Cache
What is the Oracle Database Buffer CacheWhat is the Oracle Database Buffer Cache
What is the Oracle Database Buffer Cache
 
SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3SOUG_SDM_OracleDB_V3
SOUG_SDM_OracleDB_V3
 
My sql innovation work -innosql
My sql innovation work -innosqlMy sql innovation work -innosql
My sql innovation work -innosql
 
11g r2 flashcache_Tips
11g r2 flashcache_Tips11g r2 flashcache_Tips
11g r2 flashcache_Tips
 
11g R2
11g R211g R2
11g R2
 
Low-level Graphics APIs
Low-level Graphics APIsLow-level Graphics APIs
Low-level Graphics APIs
 
8 tune tusc
8 tune tusc8 tune tusc
8 tune tusc
 
Optimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardwareOptimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardware
 
Ceph Performance: Projects Leading up to Jewel
Ceph Performance: Projects Leading up to JewelCeph Performance: Projects Leading up to Jewel
Ceph Performance: Projects Leading up to Jewel
 
Ceph Performance: Projects Leading Up to Jewel
Ceph Performance: Projects Leading Up to JewelCeph Performance: Projects Leading Up to Jewel
Ceph Performance: Projects Leading Up to Jewel
 
Zarafa Scaling & Performance
Zarafa Scaling & PerformanceZarafa Scaling & Performance
Zarafa Scaling & Performance
 
A novel method to extend flash memory lifetime in flash based dbms
A novel method to extend flash memory lifetime in flash based dbmsA novel method to extend flash memory lifetime in flash based dbms
A novel method to extend flash memory lifetime in flash based dbms
 

Más de Guy Harrison

Five database trends - updated April 2015
Five database trends - updated April 2015Five database trends - updated April 2015
Five database trends - updated April 2015Guy Harrison
 
From oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsGuy Harrison
 
Thriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolutionThriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolutionGuy Harrison
 
Mega trends in information management
Mega trends in information managementMega trends in information management
Mega trends in information managementGuy Harrison
 
Big datacamp2013 share
Big datacamp2013 shareBig datacamp2013 share
Big datacamp2013 shareGuy Harrison
 
Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013Guy Harrison
 
Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Guy Harrison
 
Making the most of ssd in oracle11g
Making the most of ssd in oracle11gMaking the most of ssd in oracle11g
Making the most of ssd in oracle11gGuy Harrison
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuningGuy Harrison
 
Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop Guy Harrison
 
Next generation databases july2010
Next generation databases july2010Next generation databases july2010
Next generation databases july2010Guy Harrison
 
Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)Guy Harrison
 
Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014Guy Harrison
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance PlsqlGuy Harrison
 
Performance By Design
Performance By DesignPerformance By Design
Performance By DesignGuy Harrison
 
Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)Guy Harrison
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
How I learned to stop worrying and love Oracle
How I learned to stop worrying and love OracleHow I learned to stop worrying and love Oracle
How I learned to stop worrying and love OracleGuy Harrison
 
Performance By Design
Performance By DesignPerformance By Design
Performance By DesignGuy Harrison
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance PlsqlGuy Harrison
 

Más de Guy Harrison (20)

Five database trends - updated April 2015
Five database trends - updated April 2015Five database trends - updated April 2015
Five database trends - updated April 2015
 
From oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other toolsFrom oracle to hadoop with Sqoop and other tools
From oracle to hadoop with Sqoop and other tools
 
Thriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolutionThriving and surviving the Big Data revolution
Thriving and surviving the Big Data revolution
 
Mega trends in information management
Mega trends in information managementMega trends in information management
Mega trends in information management
 
Big datacamp2013 share
Big datacamp2013 shareBig datacamp2013 share
Big datacamp2013 share
 
Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013Hadoop, Oracle and the big data revolution collaborate 2013
Hadoop, Oracle and the big data revolution collaborate 2013
 
Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data Hadoop, oracle and the industrial revolution of data
Hadoop, oracle and the industrial revolution of data
 
Making the most of ssd in oracle11g
Making the most of ssd in oracle11gMaking the most of ssd in oracle11g
Making the most of ssd in oracle11g
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop Hadoop and rdbms with sqoop
Hadoop and rdbms with sqoop
 
Next generation databases july2010
Next generation databases july2010Next generation databases july2010
Next generation databases july2010
 
Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)Optimize oracle on VMware (April 2011)
Optimize oracle on VMware (April 2011)
 
Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014Optimizing Oracle databases with SSD - April 2014
Optimizing Oracle databases with SSD - April 2014
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance Plsql
 
Performance By Design
Performance By DesignPerformance By Design
Performance By Design
 
Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)Optimize Oracle On VMware (Sep 2011)
Optimize Oracle On VMware (Sep 2011)
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
How I learned to stop worrying and love Oracle
How I learned to stop worrying and love OracleHow I learned to stop worrying and love Oracle
How I learned to stop worrying and love Oracle
 
Performance By Design
Performance By DesignPerformance By Design
Performance By Design
 
High Performance Plsql
High Performance PlsqlHigh Performance Plsql
High Performance Plsql
 

Último

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Último (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Thanks for the Memory: A Guide to Optimizing Oracle Database Memory

  • 1. Thanks for the Memory Guy Harrison Director, Melbourne R&D guy.harrison@quest.com www.guyharrison.net
  • 3. Human memory is complex Short Term Sensory Store: ~ 1 second uncompressed raw memory Working memory: Limited capacity, requires attention Long term memory: physically stored in brain structure; large capacity; indexed strangely Beyond Bullets Points: By: Cliff Atkinson
  • 4.
  • 5. PGA is used for program working memory such as sorting and hashing
  • 6.
  • 7. What consumes PGA memory Sorts: ORDER BY SORT-MERGE JOIN UNION, INTERSECT, MINUS Pre-10GR2 GROUP BY , DISTINCT Analytic functions: OVER(), LEAD(), LAG(), etc Hash Operations: Hash join Hash GROUP BY, DISTINCT PL/SQL variables Collections BULK COLLECT Parameter passing without NOCOPY
  • 8. PGA Aggregate Target and session memory
  • 9. Optimal, one-pass, multi-pass Multi-pass Single Pass Optimal
  • 10. Sort merge and hash joins
  • 13. PGA advice - manual
  • 15. PGA and Sorts – Spotlight on Oracle
  • 16. Opting out of PGA Aggregate Target Default workarea sizing policies only allow for a session to get 10-20% of the PGA If a single large sort is in progress, it makes sense to “opt out” of automatic workarea sizing
  • 18. Modified LRU mechanism Oracle Session Buffer Cake Buffer Cache
  • 19. Modified LRU mechanism: Table Scans Oracle Session Buffer Cake Buffer Cache
  • 20. Impact of direct path IO http://guyh.textdriven.com/OPSGSamples/Ch18/temporary_direct.sql
  • 21. The buffer cache “hit rate” http://guyh.textdriven.com/OPSGSamples/Ch18/hit_rate.sql
  • 25. Automatic Shared Memory management (ASMM) Default in 10g and recommended (with caveats): Set Minimum values for key pools (buffer pools, shared pool) Manually size non-default pools using V$DB_CACHE_ADVICE Monitor for memory starvation Monitor for memory thrashing Waits on “SGA: allocation forcing component growth”
  • 27. Optimizing overall memory Optimizing between PGA and SGA are often more significant than allocating within each area In 10g optimization is difficult: Compare PGA and Buffer Cache advisories Adjust based on IO types (direct read temp vs. physical reads) In 11g can use Automatic Memory Management Risk of thrashing and starvation is greater than with ASMM Set minimum values for all pools Manually configure non-default buffer pools
  • 28. Worst case scenario Trivial memory allocations from PL/SQL programs can steal vital memory from buffer cache Situation can become worse if MTS is enabled Setting minimum values is virtually mandatory
  • 29. Spotlight on Oracle memory management
  • 30. Spotlight on Oracle memory management
  • 31. 11g Result Set Cache Can provide massive improvements for expensive queries on static tables In memory dynamic materialized view?
  • 32. Result set cache Caveats: Single latch on modifications Any modification to a dependent table flushes the result sets Can select statements only at the table level or by inserting a hint Bottom line: Limited effectiveness Unique candidate SQLs must be low frequency Tables must be static
  • 33. Things we didn’t talk about Shared pool Redo buffer Large Pool Flashback buffer
  • 34. Key take aways Don’t emphasize buffer cache tuning at the expense of PGA Consider opting out of PGA Aggregate Target for large sorts ASMM and ASM are fine, but set minimums for important memory pools Result set cache is promising, but right now is of limited applicability

Notas del editor

  1. Apologies, I’m a database type.....
  2. As a result of this architecture, you can only really expect to take a handful of items out of a powerpoint presentation. I’ll list the take aways at the end....