SlideShare una empresa de Scribd logo
1 de 29
Forecasting Database Performance    Du  Shenglin  June 6th 2011
What do Capacity do? Manager ask     “Can our database survive in next year or the new promotion program”? Performance Tuning != Capacity planning DBA  is not totally equal to Capacity Analyst
What do Capacity do? How Much headroom do we still have for further increasing, how many days can we hold without add/upgrade hardware? What’s the costs or impact to the site with adding or changing application code What kind of platform/database/OS should we use for the new introduced applications How to survive for the sudden performance deviations?
Agenda Resource Model and Theory Response Time Analysis Steps to do Capacity Analysis Case Study
Resource  Site Level  	    Machine, License, database, Storage, Manpower… System Level  	    CPU, IO, Memory, Disk, Network, Kernel Settings Database Level  	    Latch, Enqueue, Lock, Physical IO, Logical IO…
Modeling - Making the Complex Simple   The world is much too complex for us to understand.  Mathematical Model Queue theory Line modeling Regression analysis Utilization  Baseline Model is not perfect, not 100% precision
The Linear modeling
Linear Regression – Scalability
The Response Time Curve Response Time=Service Time + Queue Time
Queuing Theory Remain in the queue until its turn to be serviced  Common FIFO or priority queue Queue length Wait times and wait events CPU queue and IO queue
Response Time Drill Down Response Time=Service Time + Queue Time Rt =St + Qt CPU Queue Network Transfer CPU Usr+Sys Memory Queue Memory Access Disk Queue Disk Transfer Network Queue
Utilization and Headroom Headroom is available usable resources -Total Capacity minus Peak Utilization and Margin -Applies to CPU, RAM, Net, Disk and OS -Can be very complex to determine, it depends
CPU Capacity Measurements CPU utilization is defined as busy time divided by elapsed time for each CPU CPU time = CPU Queue + CPU usr+sys Processes wait on a run queue, causing high load averages, then run on a CPU in user and system mode.  More CPUs reduce queue wait. Faster CPUs reduce usr+sys time.
CPU Capacity Measurements U=λ*St*M CPU Utilization=Arrival rate* cpu_time_exec(us)/POWER(10,6)/number_of_CPU CPU Utilization=buffer_gets* buffer_gets_time_per_exec(us)/POWER(10,6)/number_of_CPU We can use this format for many cases
The Response Time Curve - Multiple CPU
IO Response Time Profile ,[object Object]
HDD 5-10ms
SSD – 100 -500us
IO Service Time Includes 3 Components:	  - Access Time – Time It Takes To Move Heads To The Desired Track.  	   - Rotation Time – Time It Takes To Locate The Desired Sector on The Track. 	    -Transfer Time – Time It Takes To Read/Write The Data ,[object Object],[object Object]
 log file sync – less than 4ms,[object Object]
Daily Executions
WoW Executions
YOY Executions
Data Collection What kind of data to collect When to collect the data Where to put the data How often to collect the data How long to keep the data How to interpret and present the data     A Picture Is Worth A Thousand Words      Script and automate is necessary
Capacity Monitoring in database level Peak executions  Sessions Shared pool usage LIO/exec PIO/exec CPU_time/LIO Redo size Free memory Commits Disk space usage …..
Risk Mitigation Strategies Capacity Analyst is not only DBA Tuning/fixing the issue  - DBA or SA’s task? Balancing existing workload Upgrade and buy more CPU capacity  Split and Sharding
Steps to take for Capacity Analysis 1. Determine the question 2. Gather workload data          	 - What, how and how often 3. Characterize the workload data 		- Map, Interpret the data	 4. Develop and use appropriate model 		-  Present your data, Graph 5. Validate the forecast 6. Forecast
Case Study #1 – Delete Performance Questions: How many data can we delete every day? If the delete will catch up in no-peak time? How many thread can we use to do delete? What’s the main cost for delete job?
Case Study #1 – Delete Performance delete performance is decided by IO response time/ PIO_Per_row. SNAP_TIME            EXEC_PER_SEC LIO Per Exec PIO Per Exec Rows Per Exec -------------------- ------------ ------------ ------------ ------------- 2011/02/10 15:49              .04     10194.44      2323.02          1000 2011/02/10 16:04              .05     10200.82         2322          1000 2011/02/10 16:19              .06     10198.03       1967.9         999.9 2011/02/10 16:34              .06     10201.81      1985.98          1000 2011/02/10 16:49              .06     10194.11      2088.38         999.9 1/6m/(2323/1000)=1000000/6/2323=71 rows The real case: deletion started at: 2011-02-10 15:38:45 rows to delete: 1232177 rows   deleted: 1232171 deletion   ended at: 2011-02-10 20:47:51 1232171/((TO_DATE('2011-02-1020:47:51','YYYY-MM-DDHH24:MI:SS')-TO_DATE('2011-02-1015:38:45','YYYY-MM-DDHH24:MI:SS'))*24*60*60) 66.4386391

Más contenido relacionado

La actualidad más candente

Opportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCIOpportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCIRyousei Takano
 
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and DeploymentABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and DeploymentRyousei Takano
 
Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作鈵斯 倪
 
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)Kohei KaiGai
 
A complete fingerprint matching algorithm on gpu
A complete fingerprint matching algorithm on gpuA complete fingerprint matching algorithm on gpu
A complete fingerprint matching algorithm on gpuHai le Hong
 
Horizontal scaling by partitioning
Horizontal scaling by partitioningHorizontal scaling by partitioning
Horizontal scaling by partitioningManish Tomar
 

La actualidad más candente (11)

Opportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCIOpportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCI
 
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and DeploymentABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
 
Dark silicon
Dark siliconDark silicon
Dark silicon
 
VMworld 2009: VMworld Data Center
VMworld 2009: VMworld Data CenterVMworld 2009: VMworld Data Center
VMworld 2009: VMworld Data Center
 
Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作
 
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
Technology Updates of PG-Strom at Aug-2014 (PGUnconf@Tokyo)
 
Tensor Processing Unit (TPU)
Tensor Processing Unit (TPU)Tensor Processing Unit (TPU)
Tensor Processing Unit (TPU)
 
A complete fingerprint matching algorithm on gpu
A complete fingerprint matching algorithm on gpuA complete fingerprint matching algorithm on gpu
A complete fingerprint matching algorithm on gpu
 
Google TPU
Google TPUGoogle TPU
Google TPU
 
TPU paper slide
TPU paper slideTPU paper slide
TPU paper slide
 
Horizontal scaling by partitioning
Horizontal scaling by partitioningHorizontal scaling by partitioning
Horizontal scaling by partitioning
 

Destacado

TRSGUIDFORASSOCIATESREVISEDAP2014
TRSGUIDFORASSOCIATESREVISEDAP2014TRSGUIDFORASSOCIATESREVISEDAP2014
TRSGUIDFORASSOCIATESREVISEDAP2014Roger Sinniah
 
Canadian tax configuration in sap
Canadian tax configuration in sapCanadian tax configuration in sap
Canadian tax configuration in sapAmit Sawant
 
Vertex Configuration Guide. A to Z Steps with Description.
Vertex Configuration Guide. A to Z Steps with Description.Vertex Configuration Guide. A to Z Steps with Description.
Vertex Configuration Guide. A to Z Steps with Description.Keyur Mistry
 
Sap cin tax configuration
Sap cin tax configurationSap cin tax configuration
Sap cin tax configurationKeyur Mistry
 
Service taxes india and SAP Configuration (TAXINN)
Service taxes india and SAP Configuration (TAXINN)Service taxes india and SAP Configuration (TAXINN)
Service taxes india and SAP Configuration (TAXINN)Irfan Shokat
 

Destacado (6)

TRSGUIDFORASSOCIATESREVISEDAP2014
TRSGUIDFORASSOCIATESREVISEDAP2014TRSGUIDFORASSOCIATESREVISEDAP2014
TRSGUIDFORASSOCIATESREVISEDAP2014
 
Team Work
Team WorkTeam Work
Team Work
 
Canadian tax configuration in sap
Canadian tax configuration in sapCanadian tax configuration in sap
Canadian tax configuration in sap
 
Vertex Configuration Guide. A to Z Steps with Description.
Vertex Configuration Guide. A to Z Steps with Description.Vertex Configuration Guide. A to Z Steps with Description.
Vertex Configuration Guide. A to Z Steps with Description.
 
Sap cin tax configuration
Sap cin tax configurationSap cin tax configuration
Sap cin tax configuration
 
Service taxes india and SAP Configuration (TAXINN)
Service taxes india and SAP Configuration (TAXINN)Service taxes india and SAP Configuration (TAXINN)
Service taxes india and SAP Configuration (TAXINN)
 

Similar a Forecasting database performance

High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...EUDAT
 
Bt0070 operating systems
Bt0070   operating systemsBt0070   operating systems
Bt0070 operating systemssmumbahelp
 
Rankwave MOMENT™ (English)
Rankwave MOMENT™ (English)Rankwave MOMENT™ (English)
Rankwave MOMENT™ (English)HyoungEun Kim
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSvtunotesbysree
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d methodAjith Narayanan
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the fieldInnoTech
 
Split my monolith - Devoxx
Split my monolith - DevoxxSplit my monolith - Devoxx
Split my monolith - Devoxxflorentpellet
 
Oracle database performance diagnostics - before your begin
Oracle database performance diagnostics  - before your beginOracle database performance diagnostics  - before your begin
Oracle database performance diagnostics - before your beginHemant K Chitale
 
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganKoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganTobias Koprowski
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the fieldJoAnna Cheshire
 
Iwsm2014 performance measurement for cloud computing applications using iso...
Iwsm2014   performance measurement for cloud computing applications using iso...Iwsm2014   performance measurement for cloud computing applications using iso...
Iwsm2014 performance measurement for cloud computing applications using iso...Nesma
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesAmazon Web Services
 
Split my monolith - Workshop
Split my monolith - WorkshopSplit my monolith - Workshop
Split my monolith - Workshopmartinsson
 
GPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and ContainerGPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and ContainerAndrew Yongjoon Kong
 
@SIMUL8 Virtual User Group, September: Brian Harrington, Less is More
@SIMUL8 Virtual User Group, September: Brian Harrington, Less is More@SIMUL8 Virtual User Group, September: Brian Harrington, Less is More
@SIMUL8 Virtual User Group, September: Brian Harrington, Less is MoreSIMUL8 Corporation
 
Best Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaBest Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaDatabricks
 
KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018Tobias Koprowski
 

Similar a Forecasting database performance (20)

High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
High Performance & High Throughput Computing - EUDAT Summer School (Giuseppe ...
 
Bt0070 operating systems
Bt0070   operating systemsBt0070   operating systems
Bt0070 operating systems
 
Rankwave MOMENT™ (English)
Rankwave MOMENT™ (English)Rankwave MOMENT™ (English)
Rankwave MOMENT™ (English)
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d method
 
Sql Server tips from the field
Sql Server tips from the fieldSql Server tips from the field
Sql Server tips from the field
 
Split my monolith - Devoxx
Split my monolith - DevoxxSplit my monolith - Devoxx
Split my monolith - Devoxx
 
Oracle database performance diagnostics - before your begin
Oracle database performance diagnostics  - before your beginOracle database performance diagnostics  - before your begin
Oracle database performance diagnostics - before your begin
 
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganKoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
 
Sql server tips from the field
Sql server tips from the fieldSql server tips from the field
Sql server tips from the field
 
Iwsm2014 performance measurement for cloud computing applications using iso...
Iwsm2014   performance measurement for cloud computing applications using iso...Iwsm2014   performance measurement for cloud computing applications using iso...
Iwsm2014 performance measurement for cloud computing applications using iso...
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
Split my monolith - Workshop
Split my monolith - WorkshopSplit my monolith - Workshop
Split my monolith - Workshop
 
GPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and ContainerGPU cloud with Job scheduler and Container
GPU cloud with Job scheduler and Container
 
@SIMUL8 Virtual User Group, September: Brian Harrington, Less is More
@SIMUL8 Virtual User Group, September: Brian Harrington, Less is More@SIMUL8 Virtual User Group, September: Brian Harrington, Less is More
@SIMUL8 Virtual User Group, September: Brian Harrington, Less is More
 
Best Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaBest Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and Delta
 
KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018
 
Bt0070
Bt0070Bt0070
Bt0070
 

Último

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...Drew Madelung
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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 RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

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...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Forecasting database performance

  • 1. Forecasting Database Performance Du Shenglin June 6th 2011
  • 2. What do Capacity do? Manager ask “Can our database survive in next year or the new promotion program”? Performance Tuning != Capacity planning DBA is not totally equal to Capacity Analyst
  • 3. What do Capacity do? How Much headroom do we still have for further increasing, how many days can we hold without add/upgrade hardware? What’s the costs or impact to the site with adding or changing application code What kind of platform/database/OS should we use for the new introduced applications How to survive for the sudden performance deviations?
  • 4. Agenda Resource Model and Theory Response Time Analysis Steps to do Capacity Analysis Case Study
  • 5. Resource Site Level Machine, License, database, Storage, Manpower… System Level CPU, IO, Memory, Disk, Network, Kernel Settings Database Level Latch, Enqueue, Lock, Physical IO, Logical IO…
  • 6. Modeling - Making the Complex Simple The world is much too complex for us to understand. Mathematical Model Queue theory Line modeling Regression analysis Utilization Baseline Model is not perfect, not 100% precision
  • 8. Linear Regression – Scalability
  • 9. The Response Time Curve Response Time=Service Time + Queue Time
  • 10. Queuing Theory Remain in the queue until its turn to be serviced Common FIFO or priority queue Queue length Wait times and wait events CPU queue and IO queue
  • 11. Response Time Drill Down Response Time=Service Time + Queue Time Rt =St + Qt CPU Queue Network Transfer CPU Usr+Sys Memory Queue Memory Access Disk Queue Disk Transfer Network Queue
  • 12. Utilization and Headroom Headroom is available usable resources -Total Capacity minus Peak Utilization and Margin -Applies to CPU, RAM, Net, Disk and OS -Can be very complex to determine, it depends
  • 13. CPU Capacity Measurements CPU utilization is defined as busy time divided by elapsed time for each CPU CPU time = CPU Queue + CPU usr+sys Processes wait on a run queue, causing high load averages, then run on a CPU in user and system mode. More CPUs reduce queue wait. Faster CPUs reduce usr+sys time.
  • 14. CPU Capacity Measurements U=λ*St*M CPU Utilization=Arrival rate* cpu_time_exec(us)/POWER(10,6)/number_of_CPU CPU Utilization=buffer_gets* buffer_gets_time_per_exec(us)/POWER(10,6)/number_of_CPU We can use this format for many cases
  • 15. The Response Time Curve - Multiple CPU
  • 16.
  • 18. SSD – 100 -500us
  • 19.
  • 20.
  • 24. Data Collection What kind of data to collect When to collect the data Where to put the data How often to collect the data How long to keep the data How to interpret and present the data A Picture Is Worth A Thousand Words Script and automate is necessary
  • 25. Capacity Monitoring in database level Peak executions Sessions Shared pool usage LIO/exec PIO/exec CPU_time/LIO Redo size Free memory Commits Disk space usage …..
  • 26. Risk Mitigation Strategies Capacity Analyst is not only DBA Tuning/fixing the issue - DBA or SA’s task? Balancing existing workload Upgrade and buy more CPU capacity Split and Sharding
  • 27. Steps to take for Capacity Analysis 1. Determine the question 2. Gather workload data - What, how and how often 3. Characterize the workload data - Map, Interpret the data 4. Develop and use appropriate model - Present your data, Graph 5. Validate the forecast 6. Forecast
  • 28. Case Study #1 – Delete Performance Questions: How many data can we delete every day? If the delete will catch up in no-peak time? How many thread can we use to do delete? What’s the main cost for delete job?
  • 29. Case Study #1 – Delete Performance delete performance is decided by IO response time/ PIO_Per_row. SNAP_TIME EXEC_PER_SEC LIO Per Exec PIO Per Exec Rows Per Exec -------------------- ------------ ------------ ------------ ------------- 2011/02/10 15:49 .04 10194.44 2323.02 1000 2011/02/10 16:04 .05 10200.82 2322 1000 2011/02/10 16:19 .06 10198.03 1967.9 999.9 2011/02/10 16:34 .06 10201.81 1985.98 1000 2011/02/10 16:49 .06 10194.11 2088.38 999.9 1/6m/(2323/1000)=1000000/6/2323=71 rows The real case: deletion started at: 2011-02-10 15:38:45 rows to delete: 1232177 rows deleted: 1232171 deletion ended at: 2011-02-10 20:47:51 1232171/((TO_DATE('2011-02-1020:47:51','YYYY-MM-DDHH24:MI:SS')-TO_DATE('2011-02-1015:38:45','YYYY-MM-DDHH24:MI:SS'))*24*60*60) 66.4386391
  • 30. Case Study #2 – Using MySQL What capacity analysis Should we do to evaluate MySQL ? MySQL version Machine OS LOCAL DISK/SSD Kernel configuration MySQL Parameters mysqlySQL InnoDB setup best practice.doc
  • 31. Answers to what Capacity need to do Measure the capacity of the site correctly and accurately. Be able to predict the growth of site, identify future performance problem Define what is balance and find a strategy to keep dynamic balance. Impact analysis of system level change. Identify dangerous performance deviations.