SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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

En vedette (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)
 

Similaire à Forecasting database performance

Bt0070 operating systems
Bt0070   operating systemsBt0070   operating systems
Bt0070 operating systems
smumbahelp
 
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
 

Similaire à 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
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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...
 

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.