SlideShare ist ein Scribd-Unternehmen logo
1 von 42
© Copyright 2015. Apps Associates LLC. 1
Performance Tuning Overview
May 30, 2015
© Copyright 2015. Apps Associates LLC. 2
Satyendra Kumar Pasalapudi
Associate Practice Director – IMS, Cloud & Big data Practice
@ Apps Associates
Co Founder & President of AIOUG
@pasalapudi
© Copyright 2015. Apps Associates LLC. 3
Performance Tuning Overview
© Copyright 2015. Apps Associates LLC. 4
What is the cost of Oracle License for the below configuration ?
4 CPU( 8 Cores) Intel Processor – Running Database Oracle Enterprise
Edition 11gR2 with Partitioning and Tuning & Diagnostic Pack on Oracle Linux
– Sun Netra X3-2 Servers
Per CPU Cost
Software
Updates &
Support Total No of CPUs Total $
Oracle Enterprise Edition 47500 10450 57950 4 231800
Partitioning 11500 2530 14030 4 56120
Diagnostic Pack 5000 1100 6100 4 24400
Tuning Pack 12000 2640 14640 4 58560
Total 370880 22252800 INR
RAC 23000 5060 28060 8 224480
4 370880
Total 966240 57974400 INR
Do you know the value of PT ?
© Copyright 2015. Apps Associates LLC. 5
Tuning Questions
• Who Tunes?
- Application designers
- Application Developers
- DBAs
• Why Tune?
• How much tuning?
© Copyright 2015. Apps Associates LLC. 6
Tuning Goals
• Access the least number of blocks
• Cache blocks in memory
• Share application code
• Read and write data as fast as possible
• Ensure users do not wait for resources
• Perform backups and housekeeping while minimizing impact
© Copyright 2015. Apps Associates LLC. 7
• Response Time
• Database availability
•Database hit percentages
•Memory / CPU / Disk utilization
© Copyright 2015. Apps Associates LLC. 8
• Tune the design
• Tune the application
• Tune memory
• Tune IO
• Tune contention
• Tune Operating system
Tuning Steps
© Copyright 2015. Apps Associates LLC. 99
How to Approach a Performance Issue
 DEFINE the problem clearly
 GATHER the right data to analyze the issue
 Identify the ROOT CAUSE of the problem, possibly gather additional data
 Search for a KNOWN SOLUTION or workaround that addresses the root
cause of the problem
 If it is a product issue, PASS ON the right information to support/dev
through the regular channels
 Try to identify a TEMPORARY WORKAROUND to alleviate the issue while
you get a product fix
© Copyright 2015. Apps Associates LLC. 1010
Define the problem
• Get a clear understanding of the performance issue
What
Where
When
Why
How
© Copyright 2015. Apps Associates LLC. 1111
Define the problem
© Copyright 2015. Apps Associates LLC. 12
Performance Tuning Approach
© Copyright 2015. Apps Associates LLC. 14
Oracle tuning methodology
• Tune business rules
• Tune data design
• Tune application design
• Tune logical structure
• Tune database operations
• Tune access paths
• Tune memory allocation
• Tune I/O and physical structure
• Tune resource contention
• Tune platform
© Copyright 2015. Apps Associates LLC. 15
How does the database process OLTP Caching
• Cache data in memory from disk to achieve fast query response
• For OLTP/ DSS workloads, memory should be big enough to hold as much
as possible
SGA
Buffer Cache
100% cache hit ratio is ideal for
OLTP workloads
© Copyright 2015. Apps Associates LLC. 16
How does the database process OLTP?
• CPU time is mainly consumed by I/O wait
Cache miss Cache Hit
© Copyright 2015. Apps Associates LLC. 17
OLTP performance issues
2. User Volume is
increasing...
1. Data Size is
increasing...
SGA
1. Huge amounts of data
2. Not possible to cache
all data
3. Many I/O operations
Buffer
Cache
© Copyright 2015. Apps Associates LLC. 18
0.00
2.00
4.00
6.00
8.00
10.00
12.00
14.00
16.00
0
100
200
300
400
500
600
700
800
100 200 300 400 500 600 700 800
ResponseTime(Normal-
100Thread=>1.00)
TPS(Normal-100Thread=>100)
Thread
TPS RES
Typical Problem of busy systems
I/O bottleneck
Low Throughput and Slow Response
Low CPU usage
© Copyright 2015. Apps Associates LLC. 19
It’s all about I/O- Logical I/O
© Copyright 2015. Apps Associates LLC. 20
It’s all about I/O- Physical I/O
© Copyright 2015. Apps Associates LLC. 21
Typical Storage Bottlenecks
© Copyright 2015. Apps Associates LLC. 22
Database I/O Bottlenecks: Wait Events
© Copyright 2015. Apps Associates LLC. 23
Commits work
 commit;
 Newest System Change Number (SCN)
obtained from control files
 Data in the database buffer cache marked as
‘updated and ready for saving’
 ‘commit’ placed into redo buffer
 LGWR writes redo buffer contents to redo log
files & removes from redo buffer
 Control file updated with latest SCN
 Commit complete message returned to user
 Later ... DBWR updates emp table in the data
file and updates the header of the data file
with the latest SCN
© Copyright 2015. Apps Associates LLC. 25
Tools to Identify Database Performance Issues
© Copyright 2015. Apps Associates LLC. 26
Performance Methodology
© Copyright 2015. Apps Associates LLC. 27
Increasing Memory Hierarchy
Intel Unleashes Haswell-EX Xeon E7 V3 Processors – Up to 18 Cores, 45 MB L3 Cache, 12 TB
DDR4 Memory Support and 5.7 Billion Transistors to deliver big data insights
Memory Hierarchy
2
CPU
Registers
L1/L2/L3 CACHE
RAM
SSD
Disk
Huge Pages
Memory Architecture
From a memory management perspective, the entire physical memory is divided into "frames"
and the virtual memory is divided into "pages". The memory management unit performs a
translation of virtual memory address to physical memory address. The information regarding
which virtual memory page maps to which physical frame is kept in a data structure called the
"Page Table".
Page table lookups are costly. In order to avoid performance hits due to this lookup, a fast
lookup cache called Translation Lookaside Buffer(TLB) is maintained by most architectures.
So any virtual memory address which requires translation to the physical memory address is
first compared with the translation lookaside buffer for a valid mapping. When a valid address
translation is not present in the TLB, it is called a "TLB miss". If a TLB miss occurs, the memory
management unit will have to refer to the page tables to get the translation. This brings
additional performance costs, hence it is important that we try to reduce the TLB misses.
What is HugePages
Linux Kernel allocates physical memory in unit called pages, the default size of the page
is 4KB. Kernel manages allocation of Pages in PageTable, HugePages allows larger page
size, the default HugePage size is 2048KB. The larger page size results in performance
benefits as system deals with less number of pages, as the PageTable is smaller.
Huge Pages
Huge Pages
Huge Pages
Huge Pages
3
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K
4K 4K 4K 4K 4K 4K 4K 4K
4K 4K
4K 4K
2 MB
2 MB
2 MB 2 MB2 MB
72 GB RAM
24 GB
RAM
48 GB
HugePages
Default HugePages pool
Huge Pages
Advantages of HugePages
HugePages are not swappable, in other words
they are always pinned, so no swapping overhead.
HugePages can be allocated on-the-fly but must be
reserved first by setting the kernel parameters
HugePages are reserved at system startup
AMM (Automatic Memory Management) and HugePages
are not compatible, AMM should be disabled so that
Database can utilize HugePages. 11gR2 logs
HugePages information in alert.log.
Smart Flash Cache
How Smart Cache Works
What happens when a SQL statement is issued?
User
Library Cache
Shared SQL Area
Shared Pool
CnC1 C2 …
3
Optimizer
Oracle Database
Code Generator
1
Syntax Check
Semantic Check
Shared Pool check
2
Parsing
4
SQL Execution
© Copyright 2015. Apps Associates LLC. 41
Adaptive Execution Plans
• A query plan changes during execution because runtime conditions indicate that
optimizer estimates are inaccurate
• All adaptive execution plans rely on statistics that are collected during query
execution.
• The database uses adaptive execution plans when
OPTIMIZER_FEATURE_ENALBE is set to 12.1.01 or later and
OPTIMIZER_ADAPTIVE_REPORTING_ONLY parameter set to false.
• The two adaptive plan techniques are
– Dynamic Plans
– Re optimization
© Copyright 2015. Apps Associates LLC. 42
Dynamic Plan – Adaptive Execution Plan
© Copyright 2015. Apps Associates LLC. 43
Thank You!@pasalapudi

Weitere ähnliche Inhalte

Was ist angesagt?

Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNHadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
DataWorks Summit
 

Was ist angesagt? (20)

Apache Ambari: Past, Present, Future
Apache Ambari: Past, Present, FutureApache Ambari: Past, Present, Future
Apache Ambari: Past, Present, Future
 
Apache Ambari - What's New in 2.4
Apache Ambari - What's New in 2.4 Apache Ambari - What's New in 2.4
Apache Ambari - What's New in 2.4
 
Moving your Oracle Databases to the Oracle Cloud
Moving your Oracle Databases to the Oracle CloudMoving your Oracle Databases to the Oracle Cloud
Moving your Oracle Databases to the Oracle Cloud
 
Apache Ambari - HDP Cluster Upgrades Operational Deep Dive and Troubleshooting
Apache Ambari - HDP Cluster Upgrades Operational Deep Dive and TroubleshootingApache Ambari - HDP Cluster Upgrades Operational Deep Dive and Troubleshooting
Apache Ambari - HDP Cluster Upgrades Operational Deep Dive and Troubleshooting
 
Double Your Hadoop Hardware Performance with SmartSense
Double Your Hadoop Hardware Performance with SmartSenseDouble Your Hadoop Hardware Performance with SmartSense
Double Your Hadoop Hardware Performance with SmartSense
 
SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...
SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...
SQL AlwaysON for SharePoint HA/DR on Azure Global Azure Bootcamp 2017 Eisenac...
 
Next Generation Execution for Apache Storm
Next Generation Execution for Apache StormNext Generation Execution for Apache Storm
Next Generation Execution for Apache Storm
 
Debugging Apache Hadoop YARN Cluster in Production
Debugging Apache Hadoop YARN Cluster in ProductionDebugging Apache Hadoop YARN Cluster in Production
Debugging Apache Hadoop YARN Cluster in Production
 
Apache Falcon : 22 Sept 2014 for Hadoop User Group France (@Criteo)
Apache Falcon : 22 Sept 2014 for Hadoop User Group France (@Criteo)Apache Falcon : 22 Sept 2014 for Hadoop User Group France (@Criteo)
Apache Falcon : 22 Sept 2014 for Hadoop User Group France (@Criteo)
 
Docker based Hadoop provisioning - anywhere
Docker based Hadoop provisioning - anywhereDocker based Hadoop provisioning - anywhere
Docker based Hadoop provisioning - anywhere
 
Past, Present and Future of Apache Ambari
Past, Present and Future of Apache AmbariPast, Present and Future of Apache Ambari
Past, Present and Future of Apache Ambari
 
Spark in yarn managed multi-tenant clusters
Spark in yarn managed multi-tenant clustersSpark in yarn managed multi-tenant clusters
Spark in yarn managed multi-tenant clusters
 
Ground Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous DatabaseGround Breakers Romania: Oracle Autonomous Database
Ground Breakers Romania: Oracle Autonomous Database
 
Streamline Hadoop DevOps with Apache Ambari
Streamline Hadoop DevOps with Apache AmbariStreamline Hadoop DevOps with Apache Ambari
Streamline Hadoop DevOps with Apache Ambari
 
Effective Spark on Multi-Tenant Clusters
Effective Spark on Multi-Tenant ClustersEffective Spark on Multi-Tenant Clusters
Effective Spark on Multi-Tenant Clusters
 
AUSOUG - NZOUG - Groundbreakers - Jun 2019 - 19 Troubleshooting Tips and Tric...
AUSOUG - NZOUG - Groundbreakers - Jun 2019 - 19 Troubleshooting Tips and Tric...AUSOUG - NZOUG - Groundbreakers - Jun 2019 - 19 Troubleshooting Tips and Tric...
AUSOUG - NZOUG - Groundbreakers - Jun 2019 - 19 Troubleshooting Tips and Tric...
 
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNHadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
 
Discover.hdp2.2.ambari.final[1]
Discover.hdp2.2.ambari.final[1]Discover.hdp2.2.ambari.final[1]
Discover.hdp2.2.ambari.final[1]
 
Hive ACID Apache BigData 2016
Hive ACID Apache BigData 2016Hive ACID Apache BigData 2016
Hive ACID Apache BigData 2016
 
Apache Accumulo Overview
Apache Accumulo OverviewApache Accumulo Overview
Apache Accumulo Overview
 

Andere mochten auch

Andere mochten auch (19)

Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud DayRole of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
 
Ebs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practicesEbs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practices
 
Implementing cloud applications redefine your dimension
Implementing cloud applications   redefine your dimensionImplementing cloud applications   redefine your dimension
Implementing cloud applications redefine your dimension
 
Query optimizer vivek sharma
Query optimizer vivek sharmaQuery optimizer vivek sharma
Query optimizer vivek sharma
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suite
 
Dg broker & client connectivity - High Availability Day 2015
Dg broker & client connectivity -  High Availability Day 2015Dg broker & client connectivity -  High Availability Day 2015
Dg broker & client connectivity - High Availability Day 2015
 
Indexes overview
Indexes overviewIndexes overview
Indexes overview
 
Database and application performance vivek sharma
Database and application performance vivek sharmaDatabase and application performance vivek sharma
Database and application performance vivek sharma
 
Aioug ha day oct2015 goldengate- High Availability Day 2015
Aioug ha day oct2015 goldengate- High Availability Day 2015Aioug ha day oct2015 goldengate- High Availability Day 2015
Aioug ha day oct2015 goldengate- High Availability Day 2015
 
Dmz aa aioug
Dmz aa aiougDmz aa aioug
Dmz aa aioug
 
Oracle analytics cloud overview feb 2017
Oracle analytics cloud overview   feb 2017Oracle analytics cloud overview   feb 2017
Oracle analytics cloud overview feb 2017
 
veshaal-singh-ebs-oracle cloud(iaas+paas)
veshaal-singh-ebs-oracle cloud(iaas+paas)veshaal-singh-ebs-oracle cloud(iaas+paas)
veshaal-singh-ebs-oracle cloud(iaas+paas)
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebs
 
Oracle rac cachefusion - High Availability Day 2015
Oracle rac cachefusion - High Availability Day 2015Oracle rac cachefusion - High Availability Day 2015
Oracle rac cachefusion - High Availability Day 2015
 
Ebs12.2 online patching
Ebs12.2 online patching Ebs12.2 online patching
Ebs12.2 online patching
 
Oracle IaaS Overview - AIOUG Hyderabad Chapter
Oracle IaaS Overview - AIOUG Hyderabad ChapterOracle IaaS Overview - AIOUG Hyderabad Chapter
Oracle IaaS Overview - AIOUG Hyderabad Chapter
 
Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_
 
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd ChapterOracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
 
Подарочные наборы BABOR® в Магнитогорске
Подарочные наборы BABOR® в МагнитогорскеПодарочные наборы BABOR® в Магнитогорске
Подарочные наборы BABOR® в Магнитогорске
 

Ähnlich wie Performance tuning intro

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
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016
Aaron Shilo
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL Server
Stephen Rose
 

Ähnlich wie Performance tuning intro (20)

times ten in-memory database for extreme performance
times ten in-memory database for extreme performancetimes ten in-memory database for extreme performance
times ten in-memory database for extreme performance
 
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...
 
שבוע אורקל 2016
שבוע אורקל 2016שבוע אורקל 2016
שבוע אורקל 2016
 
Times ten 18.1_overview_meetup
Times ten 18.1_overview_meetupTimes ten 18.1_overview_meetup
Times ten 18.1_overview_meetup
 
Systems oracle overview_hardware
Systems oracle overview_hardwareSystems oracle overview_hardware
Systems oracle overview_hardware
 
Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster
 
11g R2
11g R211g R2
11g R2
 
Tendencias Storage
Tendencias StorageTendencias Storage
Tendencias Storage
 
Apouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12cApouc 2014-enterprise-manager-12c
Apouc 2014-enterprise-manager-12c
 
Oracle Database 11g Lower Your Costs
Oracle Database 11g Lower Your CostsOracle Database 11g Lower Your Costs
Oracle Database 11g Lower Your Costs
 
Oracle Management Cloud
Oracle Management Cloud Oracle Management Cloud
Oracle Management Cloud
 
Oracle Management Cloud
Oracle Management CloudOracle Management Cloud
Oracle Management Cloud
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture SetupBest Practices for a Complete Postgres Enterprise Architecture Setup
Best Practices for a Complete Postgres Enterprise Architecture Setup
 
My sql cluster case study apr16
My sql cluster case study apr16My sql cluster case study apr16
My sql cluster case study apr16
 
AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016
 
Large Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint DeploymentsLarge Scale SQL Considerations for SharePoint Deployments
Large Scale SQL Considerations for SharePoint Deployments
 
Database performance management
Database performance managementDatabase performance management
Database performance management
 
Oracle DB In-Memory technologie v kombinaci s procesorem M7
Oracle DB In-Memory technologie v kombinaci s procesorem M7Oracle DB In-Memory technologie v kombinaci s procesorem M7
Oracle DB In-Memory technologie v kombinaci s procesorem M7
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL Server
 
Streamline it management
Streamline it managementStreamline it management
Streamline it management
 

Kürzlich hochgeladen

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Kürzlich hochgeladen (20)

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

Performance tuning intro

  • 1. © Copyright 2015. Apps Associates LLC. 1 Performance Tuning Overview May 30, 2015
  • 2. © Copyright 2015. Apps Associates LLC. 2 Satyendra Kumar Pasalapudi Associate Practice Director – IMS, Cloud & Big data Practice @ Apps Associates Co Founder & President of AIOUG @pasalapudi
  • 3. © Copyright 2015. Apps Associates LLC. 3 Performance Tuning Overview
  • 4. © Copyright 2015. Apps Associates LLC. 4 What is the cost of Oracle License for the below configuration ? 4 CPU( 8 Cores) Intel Processor – Running Database Oracle Enterprise Edition 11gR2 with Partitioning and Tuning & Diagnostic Pack on Oracle Linux – Sun Netra X3-2 Servers Per CPU Cost Software Updates & Support Total No of CPUs Total $ Oracle Enterprise Edition 47500 10450 57950 4 231800 Partitioning 11500 2530 14030 4 56120 Diagnostic Pack 5000 1100 6100 4 24400 Tuning Pack 12000 2640 14640 4 58560 Total 370880 22252800 INR RAC 23000 5060 28060 8 224480 4 370880 Total 966240 57974400 INR Do you know the value of PT ?
  • 5. © Copyright 2015. Apps Associates LLC. 5 Tuning Questions • Who Tunes? - Application designers - Application Developers - DBAs • Why Tune? • How much tuning?
  • 6. © Copyright 2015. Apps Associates LLC. 6 Tuning Goals • Access the least number of blocks • Cache blocks in memory • Share application code • Read and write data as fast as possible • Ensure users do not wait for resources • Perform backups and housekeeping while minimizing impact
  • 7. © Copyright 2015. Apps Associates LLC. 7 • Response Time • Database availability •Database hit percentages •Memory / CPU / Disk utilization
  • 8. © Copyright 2015. Apps Associates LLC. 8 • Tune the design • Tune the application • Tune memory • Tune IO • Tune contention • Tune Operating system Tuning Steps
  • 9. © Copyright 2015. Apps Associates LLC. 99 How to Approach a Performance Issue  DEFINE the problem clearly  GATHER the right data to analyze the issue  Identify the ROOT CAUSE of the problem, possibly gather additional data  Search for a KNOWN SOLUTION or workaround that addresses the root cause of the problem  If it is a product issue, PASS ON the right information to support/dev through the regular channels  Try to identify a TEMPORARY WORKAROUND to alleviate the issue while you get a product fix
  • 10. © Copyright 2015. Apps Associates LLC. 1010 Define the problem • Get a clear understanding of the performance issue What Where When Why How
  • 11. © Copyright 2015. Apps Associates LLC. 1111 Define the problem
  • 12. © Copyright 2015. Apps Associates LLC. 12 Performance Tuning Approach
  • 13. © Copyright 2015. Apps Associates LLC. 14 Oracle tuning methodology • Tune business rules • Tune data design • Tune application design • Tune logical structure • Tune database operations • Tune access paths • Tune memory allocation • Tune I/O and physical structure • Tune resource contention • Tune platform
  • 14. © Copyright 2015. Apps Associates LLC. 15 How does the database process OLTP Caching • Cache data in memory from disk to achieve fast query response • For OLTP/ DSS workloads, memory should be big enough to hold as much as possible SGA Buffer Cache 100% cache hit ratio is ideal for OLTP workloads
  • 15. © Copyright 2015. Apps Associates LLC. 16 How does the database process OLTP? • CPU time is mainly consumed by I/O wait Cache miss Cache Hit
  • 16. © Copyright 2015. Apps Associates LLC. 17 OLTP performance issues 2. User Volume is increasing... 1. Data Size is increasing... SGA 1. Huge amounts of data 2. Not possible to cache all data 3. Many I/O operations Buffer Cache
  • 17. © Copyright 2015. Apps Associates LLC. 18 0.00 2.00 4.00 6.00 8.00 10.00 12.00 14.00 16.00 0 100 200 300 400 500 600 700 800 100 200 300 400 500 600 700 800 ResponseTime(Normal- 100Thread=>1.00) TPS(Normal-100Thread=>100) Thread TPS RES Typical Problem of busy systems I/O bottleneck Low Throughput and Slow Response Low CPU usage
  • 18. © Copyright 2015. Apps Associates LLC. 19 It’s all about I/O- Logical I/O
  • 19. © Copyright 2015. Apps Associates LLC. 20 It’s all about I/O- Physical I/O
  • 20. © Copyright 2015. Apps Associates LLC. 21 Typical Storage Bottlenecks
  • 21. © Copyright 2015. Apps Associates LLC. 22 Database I/O Bottlenecks: Wait Events
  • 22. © Copyright 2015. Apps Associates LLC. 23 Commits work  commit;  Newest System Change Number (SCN) obtained from control files  Data in the database buffer cache marked as ‘updated and ready for saving’  ‘commit’ placed into redo buffer  LGWR writes redo buffer contents to redo log files & removes from redo buffer  Control file updated with latest SCN  Commit complete message returned to user  Later ... DBWR updates emp table in the data file and updates the header of the data file with the latest SCN
  • 23. © Copyright 2015. Apps Associates LLC. 25 Tools to Identify Database Performance Issues
  • 24. © Copyright 2015. Apps Associates LLC. 26 Performance Methodology
  • 25. © Copyright 2015. Apps Associates LLC. 27 Increasing Memory Hierarchy Intel Unleashes Haswell-EX Xeon E7 V3 Processors – Up to 18 Cores, 45 MB L3 Cache, 12 TB DDR4 Memory Support and 5.7 Billion Transistors to deliver big data insights
  • 28. Memory Architecture From a memory management perspective, the entire physical memory is divided into "frames" and the virtual memory is divided into "pages". The memory management unit performs a translation of virtual memory address to physical memory address. The information regarding which virtual memory page maps to which physical frame is kept in a data structure called the "Page Table". Page table lookups are costly. In order to avoid performance hits due to this lookup, a fast lookup cache called Translation Lookaside Buffer(TLB) is maintained by most architectures. So any virtual memory address which requires translation to the physical memory address is first compared with the translation lookaside buffer for a valid mapping. When a valid address translation is not present in the TLB, it is called a "TLB miss". If a TLB miss occurs, the memory management unit will have to refer to the page tables to get the translation. This brings additional performance costs, hence it is important that we try to reduce the TLB misses.
  • 29. What is HugePages Linux Kernel allocates physical memory in unit called pages, the default size of the page is 4KB. Kernel manages allocation of Pages in PageTable, HugePages allows larger page size, the default HugePage size is 2048KB. The larger page size results in performance benefits as system deals with less number of pages, as the PageTable is smaller.
  • 33.
  • 34. Huge Pages 3 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 4K 2 MB 2 MB 2 MB 2 MB2 MB 72 GB RAM 24 GB RAM 48 GB HugePages Default HugePages pool
  • 35. Huge Pages Advantages of HugePages HugePages are not swappable, in other words they are always pinned, so no swapping overhead. HugePages can be allocated on-the-fly but must be reserved first by setting the kernel parameters HugePages are reserved at system startup AMM (Automatic Memory Management) and HugePages are not compatible, AMM should be disabled so that Database can utilize HugePages. 11gR2 logs HugePages information in alert.log.
  • 38. What happens when a SQL statement is issued? User Library Cache Shared SQL Area Shared Pool CnC1 C2 … 3 Optimizer Oracle Database Code Generator 1 Syntax Check Semantic Check Shared Pool check 2 Parsing 4 SQL Execution
  • 39. © Copyright 2015. Apps Associates LLC. 41 Adaptive Execution Plans • A query plan changes during execution because runtime conditions indicate that optimizer estimates are inaccurate • All adaptive execution plans rely on statistics that are collected during query execution. • The database uses adaptive execution plans when OPTIMIZER_FEATURE_ENALBE is set to 12.1.01 or later and OPTIMIZER_ADAPTIVE_REPORTING_ONLY parameter set to false. • The two adaptive plan techniques are – Dynamic Plans – Re optimization
  • 40. © Copyright 2015. Apps Associates LLC. 42 Dynamic Plan – Adaptive Execution Plan
  • 41. © Copyright 2015. Apps Associates LLC. 43