SlideShare una empresa de Scribd logo
1 de 92
DB2 9.5 Monitoring Performance Tuning and Problem Determination
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
New DB2 9.5 Monitoring Features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Bell Curve
The Bell Curve in Height
The Power Law Curve
If Height Were A Power Law ,[object Object]
If Height Were A Power Law ,[object Object]
If Height Were A Power Law ,[object Object],[object Object]
[object Object]
Drawing A Histogram – Step 1
Drawing A Histogram – Step 2
6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] ( 2 - 3 ] ( 1 - 2 ] [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query ( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] ( 2 - 3 ] ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range
( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] 3 ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
1 ( 6 - 7 ] 4 ( 5 - 6 ] 5 ( 4 - 5 ] 2 ( 3 - 4 ] 3 ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
1 ( 6 - 7 ] 4 ( 5 - 6 ] 5 ( 4 - 5 ] 2 ( 3 - 4 ] 3 ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range
Why Are Histograms Useful? ,[object Object],[object Object],[object Object]
Reveal Hidden Distribution Details ,[object Object],[object Object],[object Object]
Reveal Hidden Distribution Details ,[object Object],[object Object],[object Object]
Reveal Hidden Distribution Details ,[object Object],[object Object],[object Object]
Reveal Hidden Distribution Details ,[object Object],[object Object],[object Object]
Outliers
Detecting Outliers ,[object Object],[object Object]
Detecting Outliers ,[object Object],[object Object]
Net Worth Histogram
Net Worth Histogram
Aggregating Histograms ,[object Object],[object Object],[object Object]
Aggregating Averages ,[object Object]
Batting Averages ,[object Object]
Batting Averages ,[object Object]
Batting Averages 200 .390 Second 100 .290 First Lou Gehrig 100 .400 Second 200 .300 First Babe Ruth At Bats Average Half Player
Batting Averages 200 .390 Second 100 .290 First Lou Gehrig 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
Batting Averages 200 .390 Second 100 .290 First Lou Gehrig 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
Batting Averages 78.0 200 .390 Second 29.0 100 .290 First Lou Gehrig 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
Batting Averages 78.0 200 .390 Second 29.0 100 .290 First Lou Gehrig 100.0 300 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
Batting Averages 107.00 300 78.0 200 .390 Second 29.0 100 .290 First Lou Gehrig 100.0 300 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
0 ( 20 - 21 ] 0 ( 19 - 20 ] 0 ( 18 - 19 ] 0 ( 17 - 18 ] 0 ( 16 - 17 ] 0 ( 15 - 16 ] 0 ( 14 - 15 ] 0 ( 13 - 14 ] 0 ( 12 - 13 ] 0 ( 11 - 12 ] 438 ( 10 - 11 ] 1350 ( 9 - 10 ] 3238 ( 8 - 9 ] 6049 ( 7 - 8 ] 8802 ( 6 - 7 ] 9974 ( 5 - 6 ] 8802 ( 4 - 5 ] 6049 ( 3 - 4 ] 3238 ( 2 - 3 ] 1350 ( 1 - 2 ] 438 [ 0 - 1 ] January Range (seconds)
613 613 0 ( 20 - 21 ] 1890 1890 0 ( 19 - 20 ] 4533 4533 0 ( 18 - 19 ] 8469 8469 0 ( 17 - 18 ] 12322 12322 0 ( 16 - 17 ] 13963 13963 0 ( 15 - 16 ] 12322 12322 0 ( 14 - 15 ] 8469 8469 0 ( 13 - 14 ] 4533 4533 0 ( 12 - 13 ] 1890 1890 0 ( 11 - 12 ] 1051 613 438 ( 10 - 11 ] 1350 0 1350 ( 9 - 10 ] 3238 0 3238 ( 8 - 9 ] 6049 0 6049 ( 7 - 8 ] 8802 0 8802 ( 6 - 7 ] 9974 0 9974 ( 5 - 6 ] 8802 0 8802 ( 4 - 5 ] 6049 0 6049 ( 3 - 4 ] 3238 0 3238 ( 2 - 3 ] 1350 0 1350 ( 1 - 2 ] 438 0 438 [ 0 - 1 ] Jan + Feb February January Range (seconds)
613 0 613 0 ( 20 - 21 ] 1890 0 1890 0 ( 19 - 20 ] 4533 0 4533 0 ( 18 - 19 ] 8469 0 8469 0 ( 17 - 18 ] 12322 0 12322 0 ( 16 - 17 ] 14489 526 13963 0 ( 15 - 16 ] 13942 1620 12322 0 ( 14 - 15 ] 12355 3886 8469 0 ( 13 - 14 ] 11792 7259 4533 0 ( 12 - 13 ] 12452 10562 1890 0 ( 11 - 12 ] 13019 11968 613 438 ( 10 - 11 ] 11912 10562 0 1350 ( 9 - 10 ] 10497 7259 0 3238 ( 8 - 9 ] 9935 3886 0 6049 ( 7 - 8 ] 10422 1620 0 8802 ( 6 - 7 ] 10500 526 0 9974 ( 5 - 6 ] 8802 0 0 8802 ( 4 - 5 ] 6049 0 0 6049 ( 3 - 4 ] 3238 0 0 3238 ( 2 - 3 ] 1350 0 0 1350 ( 1 - 2 ] 438 0 0 438 [ 0 - 1 ] First Quarter March February January Range (seconds)
DB2 WLM Histograms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Lifecycle Of An Activity
Inter-arrival Times
Inter-arrival Times
 
 
 
 
 
 
 
How Much Data Is Enough?
How Much Data Is Enough?
How Much Data Is Enough?
How To Collect DB2 Histograms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How To Collect DB2 Histograms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How To Collect DB2 Histograms ,[object Object],[object Object],[object Object],[object Object]
How To Collect DB2 Histograms ,[object Object],[object Object],[object Object],[object Object]
Triggering A Collection ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The HISTOGRAMBIN Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The HISTOGRAMBIN Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The HISTOGRAMBIN Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The HISTOGRAMBIN Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The HISTOGRAMBIN Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Visualizing A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Controlling The Range Of A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Controlling The Range Of A Histogram ,[object Object],[object Object]
Controlling The Range Of A Histogram ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Purpose Of The Infinite Bin ,[object Object],[object Object],[object Object],[object Object],[object Object]
Why Do Bins Grow Exponentially?
[object Object],[object Object],[object Object],[object Object]
Service Level Agreements
Measuring For An SLA ,[object Object],[object Object],[object Object]
Measuring For An SLA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Measuring For An SLA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Measuring For An SLA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Measuring For An SLA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Measuring For An SLA ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
For More Information ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Más contenido relacionado

Destacado

MANAGING TIME AND WORKLOAD
MANAGING TIME AND WORKLOADMANAGING TIME AND WORKLOAD
MANAGING TIME AND WORKLOADKenny Ong
 
websphere MQ training Online
websphere MQ training Onlinewebsphere MQ training Online
websphere MQ training OnlineDivya Angel
 
IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online TutorialsBigClasses.com
 
IBM Websphere MQ Basic
IBM Websphere MQ BasicIBM Websphere MQ Basic
IBM Websphere MQ BasicPRASAD BHATKAR
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialSrinimf-Slides
 
Workload management systems_presentation_v5
Workload management systems_presentation_v5Workload management systems_presentation_v5
Workload management systems_presentation_v5cedannatt
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsBiju Nair
 

Destacado (10)

DB2 9.7 Overview
DB2 9.7 OverviewDB2 9.7 Overview
DB2 9.7 Overview
 
WORKLOAD MANAGEMENT-1
WORKLOAD MANAGEMENT-1WORKLOAD MANAGEMENT-1
WORKLOAD MANAGEMENT-1
 
MANAGING TIME AND WORKLOAD
MANAGING TIME AND WORKLOADMANAGING TIME AND WORKLOAD
MANAGING TIME AND WORKLOAD
 
websphere MQ training Online
websphere MQ training Onlinewebsphere MQ training Online
websphere MQ training Online
 
IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online Tutorials
 
IBM Websphere MQ Basic
IBM Websphere MQ BasicIBM Websphere MQ Basic
IBM Websphere MQ Basic
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete Tutorial
 
Workload management systems_presentation_v5
Workload management systems_presentation_v5Workload management systems_presentation_v5
Workload management systems_presentation_v5
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentals
 
WebSphere MQ tutorial
WebSphere MQ tutorialWebSphere MQ tutorial
WebSphere MQ tutorial
 

Similar a DB2 Workload Manager Histograms

Beauty clinic (Business Loan) urdu
Beauty clinic (Business Loan) urduBeauty clinic (Business Loan) urdu
Beauty clinic (Business Loan) urdukmjahanger
 
第5回 様々なファイル形式の読み込みとデータの書き出し
第5回 様々なファイル形式の読み込みとデータの書き出し第5回 様々なファイル形式の読み込みとデータの書き出し
第5回 様々なファイル形式の読み込みとデータの書き出しWataru Shito
 
Roll grinding Six Sigma project
Roll grinding Six Sigma projectRoll grinding Six Sigma project
Roll grinding Six Sigma projectTariq Aziz
 
slides36.pptx
slides36.pptxslides36.pptx
slides36.pptxDarSafwan
 
Push And Pull Production Systems Chap7 Ppt)
Push And Pull Production Systems   Chap7 Ppt)Push And Pull Production Systems   Chap7 Ppt)
Push And Pull Production Systems Chap7 Ppt)3abooodi
 
第2回 基本演算,データ型の基礎,ベクトルの操作方法
第2回 基本演算,データ型の基礎,ベクトルの操作方法第2回 基本演算,データ型の基礎,ベクトルの操作方法
第2回 基本演算,データ型の基礎,ベクトルの操作方法Wataru Shito
 
Maynards operation sequence technique
Maynards operation sequence techniqueMaynards operation sequence technique
Maynards operation sequence techniqueGAJANANPATHAK2
 
Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]
Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]
Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]Pankaj Rathod
 
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)Wataru Shito
 
第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)
第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)
第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)Wataru Shito
 
6. Vectors – Data Frames
6. Vectors – Data Frames6. Vectors – Data Frames
6. Vectors – Data FramesFAO
 
Analisis gap dan thurstone
Analisis gap dan thurstoneAnalisis gap dan thurstone
Analisis gap dan thurstoneM Taufiq Budi H
 
Preventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdfPreventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdfVibeshRaja
 
Preventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdfPreventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdfVibeshRaja
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleAhmed Gad
 
第3回 データフレームの基本操作 その1(解答付き)
第3回 データフレームの基本操作 その1(解答付き)第3回 データフレームの基本操作 その1(解答付き)
第3回 データフレームの基本操作 その1(解答付き)Wataru Shito
 
New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...
New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...
New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...Peter Laurinec
 
Prometheus – Storage
Prometheus – StoragePrometheus – Storage
Prometheus – Storagefabxc
 

Similar a DB2 Workload Manager Histograms (20)

histgram[1].ppt
histgram[1].ppthistgram[1].ppt
histgram[1].ppt
 
Beauty clinic (Business Loan) urdu
Beauty clinic (Business Loan) urduBeauty clinic (Business Loan) urdu
Beauty clinic (Business Loan) urdu
 
第5回 様々なファイル形式の読み込みとデータの書き出し
第5回 様々なファイル形式の読み込みとデータの書き出し第5回 様々なファイル形式の読み込みとデータの書き出し
第5回 様々なファイル形式の読み込みとデータの書き出し
 
Roll grinding Six Sigma project
Roll grinding Six Sigma projectRoll grinding Six Sigma project
Roll grinding Six Sigma project
 
slides36.pptx
slides36.pptxslides36.pptx
slides36.pptx
 
Push And Pull Production Systems Chap7 Ppt)
Push And Pull Production Systems   Chap7 Ppt)Push And Pull Production Systems   Chap7 Ppt)
Push And Pull Production Systems Chap7 Ppt)
 
第2回 基本演算,データ型の基礎,ベクトルの操作方法
第2回 基本演算,データ型の基礎,ベクトルの操作方法第2回 基本演算,データ型の基礎,ベクトルの操作方法
第2回 基本演算,データ型の基礎,ベクトルの操作方法
 
Maynards operation sequence technique
Maynards operation sequence techniqueMaynards operation sequence technique
Maynards operation sequence technique
 
Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]
Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]
Pushandpullproductionsystems chap7-ppt-100210005527-phpapp01[1]
 
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
 
第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)
第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)
第2回 基本演算,データ型の基礎,ベクトルの操作方法(解答付き)
 
draft
draftdraft
draft
 
6. Vectors – Data Frames
6. Vectors – Data Frames6. Vectors – Data Frames
6. Vectors – Data Frames
 
Analisis gap dan thurstone
Analisis gap dan thurstoneAnalisis gap dan thurstone
Analisis gap dan thurstone
 
Preventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdfPreventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdf
 
Preventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdfPreventive Maintenance-Presentation.pdf
Preventive Maintenance-Presentation.pdf
 
Genetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step ExampleGenetic Algorithm (GA) Optimization - Step-by-Step Example
Genetic Algorithm (GA) Optimization - Step-by-Step Example
 
第3回 データフレームの基本操作 その1(解答付き)
第3回 データフレームの基本操作 その1(解答付き)第3回 データフレームの基本操作 その1(解答付き)
第3回 データフレームの基本操作 その1(解答付き)
 
New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...
New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...
New Clustering-based Forecasting Method for Disaggregated End-consumer Electr...
 
Prometheus – Storage
Prometheus – StoragePrometheus – Storage
Prometheus – Storage
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Último (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

DB2 Workload Manager Histograms

  • 1. DB2 9.5 Monitoring Performance Tuning and Problem Determination
  • 2.
  • 3.
  • 5. The Bell Curve in Height
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Drawing A Histogram – Step 1
  • 12. Drawing A Histogram – Step 2
  • 13. 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
  • 14. ( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] ( 2 - 3 ] ( 1 - 2 ] [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
  • 15. 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query ( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] ( 2 - 3 ] ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range
  • 16. ( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
  • 17. ( 6 - 7 ] ( 5 - 6 ] ( 4 - 5 ] ( 3 - 4 ] 3 ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
  • 18. 1 ( 6 - 7 ] 4 ( 5 - 6 ] 5 ( 4 - 5 ] 2 ( 3 - 4 ] 3 ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range 6.20 20 5.90 19 5.75 18 5.72 17 5.38 16 4.79 15 4.73 14 4.70 13 4.53 12 4.34 11 3.67 10 3.28 9 2.77 8 2.48 7 2.41 6 1.63 5 1.36 4 1.24 3 1.21 2 0.53 1 Response Time Query
  • 19. 1 ( 6 - 7 ] 4 ( 5 - 6 ] 5 ( 4 - 5 ] 2 ( 3 - 4 ] 3 ( 2 - 3 ] 4 ( 1 - 2 ] 1 [ 0 - 1 ] Frequency Bin Range
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 26.
  • 27.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Batting Averages 200 .390 Second 100 .290 First Lou Gehrig 100 .400 Second 200 .300 First Babe Ruth At Bats Average Half Player
  • 35. Batting Averages 200 .390 Second 100 .290 First Lou Gehrig 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
  • 36. Batting Averages 200 .390 Second 100 .290 First Lou Gehrig 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
  • 37. Batting Averages 78.0 200 .390 Second 29.0 100 .290 First Lou Gehrig 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
  • 38. Batting Averages 78.0 200 .390 Second 29.0 100 .290 First Lou Gehrig 100.0 300 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
  • 39. Batting Averages 107.00 300 78.0 200 .390 Second 29.0 100 .290 First Lou Gehrig 100.0 300 40.0 100 .400 Second 60.0 200 .300 First Babe Ruth Average × At Bats At Bats Average Half Player
  • 40. 0 ( 20 - 21 ] 0 ( 19 - 20 ] 0 ( 18 - 19 ] 0 ( 17 - 18 ] 0 ( 16 - 17 ] 0 ( 15 - 16 ] 0 ( 14 - 15 ] 0 ( 13 - 14 ] 0 ( 12 - 13 ] 0 ( 11 - 12 ] 438 ( 10 - 11 ] 1350 ( 9 - 10 ] 3238 ( 8 - 9 ] 6049 ( 7 - 8 ] 8802 ( 6 - 7 ] 9974 ( 5 - 6 ] 8802 ( 4 - 5 ] 6049 ( 3 - 4 ] 3238 ( 2 - 3 ] 1350 ( 1 - 2 ] 438 [ 0 - 1 ] January Range (seconds)
  • 41. 613 613 0 ( 20 - 21 ] 1890 1890 0 ( 19 - 20 ] 4533 4533 0 ( 18 - 19 ] 8469 8469 0 ( 17 - 18 ] 12322 12322 0 ( 16 - 17 ] 13963 13963 0 ( 15 - 16 ] 12322 12322 0 ( 14 - 15 ] 8469 8469 0 ( 13 - 14 ] 4533 4533 0 ( 12 - 13 ] 1890 1890 0 ( 11 - 12 ] 1051 613 438 ( 10 - 11 ] 1350 0 1350 ( 9 - 10 ] 3238 0 3238 ( 8 - 9 ] 6049 0 6049 ( 7 - 8 ] 8802 0 8802 ( 6 - 7 ] 9974 0 9974 ( 5 - 6 ] 8802 0 8802 ( 4 - 5 ] 6049 0 6049 ( 3 - 4 ] 3238 0 3238 ( 2 - 3 ] 1350 0 1350 ( 1 - 2 ] 438 0 438 [ 0 - 1 ] Jan + Feb February January Range (seconds)
  • 42. 613 0 613 0 ( 20 - 21 ] 1890 0 1890 0 ( 19 - 20 ] 4533 0 4533 0 ( 18 - 19 ] 8469 0 8469 0 ( 17 - 18 ] 12322 0 12322 0 ( 16 - 17 ] 14489 526 13963 0 ( 15 - 16 ] 13942 1620 12322 0 ( 14 - 15 ] 12355 3886 8469 0 ( 13 - 14 ] 11792 7259 4533 0 ( 12 - 13 ] 12452 10562 1890 0 ( 11 - 12 ] 13019 11968 613 438 ( 10 - 11 ] 11912 10562 0 1350 ( 9 - 10 ] 10497 7259 0 3238 ( 8 - 9 ] 9935 3886 0 6049 ( 7 - 8 ] 10422 1620 0 8802 ( 6 - 7 ] 10500 526 0 9974 ( 5 - 6 ] 8802 0 0 8802 ( 4 - 5 ] 6049 0 0 6049 ( 3 - 4 ] 3238 0 0 3238 ( 2 - 3 ] 1350 0 0 1350 ( 1 - 2 ] 438 0 0 438 [ 0 - 1 ] First Quarter March February January Range (seconds)
  • 43.
  • 44. Lifecycle Of An Activity
  • 47.  
  • 48.  
  • 49.  
  • 50.  
  • 51.  
  • 52.  
  • 53.  
  • 54. How Much Data Is Enough?
  • 55. How Much Data Is Enough?
  • 56. How Much Data Is Enough?
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83. Why Do Bins Grow Exponentially?
  • 84.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.

Notas del editor

  1. Two of the most common applications of monitoring are performance tuning and problem determination. In these slides, we will see how histograms and other statistics can help with tuning exercises and how monitoring individual activities (e.g. queries) helps with problem determination.
  2. This is a big topic, so I am going to limit this talk to the new functionality in DB2 for LUW 9.5 rather than cover the various monitoring features DB2 has gained over the years since its introduction. I am not going to talk about low-level details like bufferpool hit ratios, but high-level statistics like response time and throughput information. We aren't going to look at individual queries and analyze them with explains, but we will look at the system as a whole and see what steps can be taken when overall system performance is being impacted.
  3. There are 3 types of new monitoring features. This talk is focused on histograms.
  4. I'm going to start by talking about the distributions and I will start with the most famous one. The Bell Curve, or Gaussian, or Normal distribution has a special property: the mean, the median, and the mode all occur at the same spot on the curve, right in the middle.
  5. Let's say you measure height. You have a sample of five men and they report their heights as follows: 5'10'', 5'8'', 5'10'', 6'0'', 5'10''. The arithmetic mean of those heights is the sum of the 5 heights divided by 5, or 5'10''. The median of those heights is the number that occurs in the middle when we order the heights from smallest to largest or largest to smallest. The mode is the most frequently occurring height. In a bell curve, the mode, median, and mean are all the same number. If you take a random sample of, say, 1000 people, the histogram of their heights would take the shape of a bell curve.
  6. Another type of distribution is called the Power Law distribution, or long-tailed distribution. It has a very different set of properties than a bell curve. The smallest measurements are enormously more frequent than the larger ones. Also, the frequency of seeing a very large measurement doesn't fall off quickly towards zero as it would on a bell curve – it keeps going, which is where it gets the name “the long tail”.
  7. Clay Shirky, in his book “Here Comes Everybody”, imagined what it would be like if height followed a power law instead of a bell curve and he sampled the heights of two hundred men.
  8. We saw that, with a bell curve, the mean of 5'10'' was a good representative height – most of us don't stray too far from that. However, when the distribution of heights in the population is a power law, the mean of 5'10'' isn't very representative any more. Why am I talking about power laws? I am talking about power laws because almost everything having to do with database workloads, such as the distribution of response times, or the times between arrivals of queries into a database system, takes the form of a power law, or something very close to it.
  9. If averages aren't useful, what do we do? We need to see the whole distribution, which only a histogram can provide.
  10. To draw a histogram, you draw a horizontal axis and you divide it up into class intervals. That's your measurement axis. For example, height would go along this axis. You could break in off into: 4 to just under 5 feet, 5 to just under 6 feet, 6 to just under 7 feet, etc. Then you draw your vertical axis and this measures the number of observations. We had 5 observations before.
  11. Four were between 5 and just under 6 feet, so we would draw a box whose height is four over the 5 to just under 6 feet class interval. One was between 6 and just under 7 feet so we would draw a box with a height of 1 over the 6 to just under 7 feet class interval.
  12. Let's do another one. Here is some data on query response times that we'll turn into a histogram. They're sorted from smallest to largest.
  13. On the right, we now have a table of class intervals that will fit all of the response times on the left. We just need to count the observations. How many queries on the left fell into the first bin [0 to 1]?
  14. That's right: One.
  15. How many fell into the range (1 to 2]? Four.
  16. And (2 to 3]? Three.
  17. And we keep going until we've finished building the histogram. That's the histogram in table form, but we can better look as a graph.
  18. This is very little data, so it doesn't take the form of any particular curve. We'll come back to the importance of having enough data later.
  19. I think we understand what a histogram is, so what is it good for? I'll talk about each of these advantages in detail in the next few slides.
  20. Let's look at a scenario to illustrate why seeing the distribution is useful. Say we have a database and during the first month in which we examine it, all the users are happy with its performance. We look at both the average response time (19 seconds) and the standard deviation (6 seconds), and we assume that if we continue to get these numbers, users will be happy, but we are wrong.
  21. Now we look at month 2. Users are complaining? What changed? Average response times are the same as month 1 aren’t they?
  22. Going back to month 1, we see the histogram is a bell curve centered at 19 seconds
  23. Now we see the problem. The average response time for half the users went up over 30% - they’re the ones complaining. It improved just as much for the other half of the users. That's why it is useful to be able to see the distribution.
  24. Another reason for having histograms is to detect outliers. In his book, The Black Swan, Nassim Nicholas Taleb wrote about rare events that have a big, relevant impact. He called these rare events black swans because, up until the 17 th Century, everyone knew that all swans were white. But then black swans were discovered in Australia and a perceived impossibility had come to pass.
  25. Taleb distinguished between two kinds of outliers. The first kind has a small, almost negligible impact. For example, say you have a group of 1000 people and you measure their weights and you compute an average. And then you add an elephant, the heaviest land animal on earth, to the group. It changes the average by less than 10%.
  26. The other type of outlier can have a significant effect on the mean, in effect, making it useless as a measurement. Say you have the same thousand people and instead of measuring their weights, you measure their net worths. Then, instead of adding the heaviest land animal on earth, you add one of the richest men on earth. If their mean net worth had been, say $200,000, adding Bill Gates to the group changes that mean to $80 million – that's an increase of over 40,000%.
  27. We can look at this in the form of a histogram. On the left, we see the net worths of the thousand people. Then we see a large number of empty bins.
  28. Then we see Bill Gate's net worth on the far right. Take a look at that horizontal axis – that's an exponential scale. To get a useful idea of what a representative net worth is, we want exclude Bill Gates from the calculation and the histogram let's us do that. Another alternative might be to compute the median rather than the arithmetic mean. The problem is, unlike a running average, where we only need to keep track of the average and the count, for the median, we need to keep every data point and this becomes a problem when you're, say, trying to track the median of query response time when you have hundreds of thousands of queries per day, sometimes thousands per second. A histogram gives you the ability to identify and potentially filter out outliers without the performance and storage penalty of keeping around the median.
  29. A final advantage of histograms is that they are easy to aggregate together, much like averages are. So you can keep a histogram of the daily response times of your database activities and then, once a month, aggregate these histograms into one histogram for the month.
  30. I mentioned that averages are easy to calculate, but you still have to be careful. In his book Innumeracy, John Allen Paulos gives an example of a common misconception in combining averages that gives rise to an apparent paradox involving batting averages.
  31. Paulos then proceeds to show us how this can occur. He says that Ruth bats .300 in the first half compared to Gehrig's .290, then Ruth bats .400 in the second half compared to Gehrig's .390. The key is that Ruth has 200 at-bats in the first half compared to Gehrig's 100 and Gehrig has 200 at-bats in the second half compared to Ruth's 100.
  32. So we multiply the average by the at-bats and we get 60 for the first half for Ruth.
  33. And we get 40 for the second half for Ruth.
  34. We get 29 and 78 for Gehrig.
  35. Ruth sums to 100.
  36. Gehrig sums to 107 for the same number of at-bats as Ruth, giving Gehrig the higher batting average.
  37. So, combining averages is fairly easy, you just have to remember to multiply by the count. But if you want to somehow combine anything more sophisticated than the average, such as standard deviation, you're out of luck. However, you can combine histograms and it is even easier than combining averages – you just add the observation counts. There is no multiplication necessary. Say you have a histogram of database query response times for January. It is a bell curve with an average between 5 and 6 seconds.
  38. Then in February, you have a response time histogram with an average between 15 and 16, also a bell curve, but it is a taller one since there were more queries executed in February than January. If you combine them, you get the Jan + Feb column and adding these is easy since there is hardly any overlap, so in most cases, you are just adding a zero to the number from January or a zero to the number from February.
  39. Then you add March. March is also a bell curve, with its average somewhere between 10 and 11 seconds. The combined histogram for the first quarter is now definitely not a bell curve, but it was easy to put together.
  40. In support of the Workload Manager work in DB2 9.5, we added six histograms. Five are related to activities. Activities are general concept we use in DB2 Workload Manager to talk about queries, loads, and DDL. I am going to speak in more detail on the next few slides about what each of these activity histograms measure. Also, one histogram exists for requests. Requests are the OPEN, FETCH, CLOSE actions that make up a cursor activity, or may not be part of an activity at all, such as PREPARE request. They may also not be externalized. There are requests from one partition to another in systems that have the data partitioning feature.
  41. Let's talk about the lifecycle of an activity. Here is an activity that illustrates the first three measurements that are made into histograms: execution time, queue time, and lifetime. This activity is a cursor activity: it gets opened, it fetches twice, and is closed. In between each fetch, there is a delay while DB2 waits for the client to submit a new request, such as the next FETCH request or the CLOSE request. This activity is also queued by the Workload Manager. We measure the queue time as the time between when the activity arrived into the system and when it comes off the queue to execute. In this case, the queue time was 20 seconds. The execution time is the time DB2 spends executing the activity, but not any idle time spent waiting for the next request from the client. So execution is just those four gray colored 3 second blocks for a total of 12 seconds. The lifetime is the total time an activity spends in the system, including the queue time, including the execution time, and including the idle time. Since the total idle time was also 12 seconds (4 + 4 + 4), the lifetime is 44 seconds (20 seconds of queue time + 12 of idle time + 12 of execution time). So those are the first 3 measurements for which we have histograms.
  42. The fourth measurement is something called inter-arrival time. This is the time between the arrival of one activity into the system and the arrival of the next. It is the inverse of the arrival rate. In this example, we have three activities.
  43. If we say activity 1 arrives at time 0 and activity 2 arrives at time 3, the inter-arrival time between activity 1 and activity 2 is 3. And between activity 2 and activity 3, the inter-arrival time is 12. So we have three activities arriving in a 15 second period. That's an average arrival rate of 0.2 activities per second, which converts to an average inter-arrival time of 5 seconds.
  44. The last of the measurements for activity histograms is a measurement of estimated cost. This is the cost that the SQL compiler computes whenever you compile a DML activity and by DML I mean SELECT, INSERT, UPDATE, DELETE and the variations on that. This cost is a weighted combination of CPU and I/O resources that DB2 can tell from the access plan and assumptions about the cardinality of the tables that the activity is going to consume. As such, it is highly dependent on table and index statistics being up-to-date. Let's assume you have a query with negligible I/O demands and on a single CPU might look like the diagram. Here we have a query with a cost of 7. Costs are generally in units of timerons, but let's assume that we have somehow converted timerons into estimated timeslices on the CPU. The blue vertical bars represent a timeslice. Query 1 demands 7 timeslices and it is the only thing running on the system so its execution time is 7, indicated by the E=7 to the right of the query. We're assuming this isn't a cursor activity, so there is no idle time. The lifetime is exactly the same as its execution time, which is 7. This is indicated by the L=7. The queue time is zero, so we Q=0 to the right of the query as well. What do you think will happened when our query has to share the one CPU with another query.
  45. What happens is its lifetime gets longer because it has to share the CPU with query 2. Query 2 suffers in the same way. The CPU will round robin between the two queries. When one them finishes (in this case, query 1 finishes first) the other query will get the CPU to itself. Notice that the lifetime and execution time of query 1 increased from 7 on the previous slide up to 12.
  46. If we add another query , query 1's lifetime and execution time jump up to 16...
  47. and then to 18 if we add a fourth query...
  48. ... and then to 20 if we add a fifth. Query 1 now almost takes 3 times as long to finish as it did original when it finished in 7 seconds.
  49. Let's go back to two queries at the same time. Let's say that instead of trying to run both queries are the same time, we use Workload Manager to limit the concurrency to 1 and then we queue anyone else that comes in. Can you guess what happens to query 1? To query 2.
  50. Query 1 finishes in 7 timeslices because it arrived first and doesn't get queued. Then query 2 arrives while query 1 is still running. It has to queue until query 1 finishes which is 6 timeslices later. Then it gets the CPU to itself where it takes 9 timeslices to finish, for a total of 15. Notice that the sum of the queue time and execution time is the lifetime. I hope this explains the idealized concept of estimated cost and why you can't just assume estimated cost will tell you exactly how long your query will run without taking into account sharing of resources such as CPU resources.
  51. I want to talk now about how much data you need to see the underlying distribution of your data. Here we have estimated cost histograms for two workloads that are identical in terms of their distribution. The individual costs are pseudo-random numbers . A pseudo-random number is generated by a pseudo-random number generator. A pseudo-random number generator takes a “seed” and generates one pseudo-random number after another. If you ask a pseudo-random number generator to generate a second set of numbers but you give it the same seed, you get the same set of numbers. If you give a pseudo-random number generator a different seed, you get a different set of pseudo-random numbers but these numbers are still distributed the same way no matter what the seed is. In the histogram I used here, I could have used a bell curve for the distribution, but to show another example of a distribution, I used an exponential distribution. The first thing you should notice is that these histograms look nothing alike. That's because you have too little data – only 10 activities. Let's see what happens when you have 50 activities...
  52. A little better. We're starting to converge on a shape, but they're still quite different. Let's see what 250 activities can do...
  53. The histograms are almost identical now. Additionally, both are starting to look like an idealized exponential distribution. This gives us insight into how we can tell when we have enough data to make good comparisons of one histogram with another. Here is a trick for ensuring you have enough data to do such comparisons: Say you have two periods of time that you want to compare. Say the first time period is between 2:00 and 3:00 PM on a Thursday afternoon. Then you take the following hour, between 3:00 and 4:00 PM and you measure histograms during each of these time periods and you compare them. If you get something like the first of the three examples, you double the size of the interval and you compare that to the next double-size interval. In our example, you would compare a 2:00 to 4:00 PM interval with a 4:00 to 6:00 PM interval. If they still don't match closely, double again. Eventually, the curves will either start to look similar as in the third example or else their distributions have changed in some way.
  54. That's enough theory. Let's look at how we can use histograms in the DB2 for LUW Workload Manager. There are three steps to collecting histograms (and other aggregates like high watermarks and counters). First, alter the service class or work action set that you want to collect histograms on and specify the COLLECT AGGREGATE ACTIVITY DATA option. Use the BASE option to get the three basic histograms.
  55. Use the EXTENDED option to get the original 3 histograms plus the inter-arrival and estimated cost histograms.
  56. Finally, to collect the request histogram, specify the COLLECT AGGREGATE REQUEST DATA BASE clause. Note that there is no EXTENDED option.
  57. The second step is to create an event monitor to write out the histograms and you need to set its state to 1 to activate it.
  58. Finally, you need to say when you want a collection to happen. You can set it up to automatically collect periodically using the WLM_COLLECT_INT database configuration parameter. Here we have it collecting once a day. Otherwise, you can have it collect immediately using the WLM_COLLECT_STATS stored procedure.
  59. When you turn on collection, activated your event monitor and triggered a collection, a table or file having this structure is what you get. You can get it as a table or a file depending on the type of event monitor you create. Note that this is a histogram bin table rather than a histogram table. Each row in this table is a bin in a histogram.
  60. The name after HISTOGRAMBIN is the name of the event monitor that you created in step 2.
  61. Let's look at the columns in this table: You can uniquely identify the histogram that this bin belongs to by looking at the combination of service_class_id, statistics_timestamp and histogram_type, assuming you set your service class up as generating this histogram.
  62. If, on the other hand, the histogram belongs to a work action set, you uniquely identify it by using histogram_type and statistics_timestamp with a work_action_set_id and a work_class_id. The histogram_type column has values like “CoordActLifetime” for the activity lifetime histogram or “CoordActQueueTime” for the activity queue time histogram.
  63. So now that you know how to uniquely identify a histogram, you know how to write a WHERE clause for queries against this table, but what should you return in your output? It turns out you only need two columns: TOP and NUMBER_IN_BIN. You don't necessarily need the BOTTOM column because it is just the TOP of the previous bin. The NUMBER_IN_BIN is just the number of observations.
  64. Let's try to visualize a histogram by querying the histogram bin table. You select the two columns from the previous slide, top and number_in_bin.
  65. Let's say we want a service classes histogram so we specify the service_class_id, say, 13. You can look up these numbers in the syscat.serviceclasses table or do a join with that table.
  66. Say we want to look at query lifetimes and...
  67. ...say we did a select distinct statistics_timestamp and we got back a timestamp of 2:30 PM on March 12, 2009.
  68. Let's order it by the TOP column in ascending order.
  69. This gives us an idea of the histogram shape, but it could be more visual.
  70. Let's refactor this code a little bit first. We'll move the query into a WITH to make the main select simpler because we're going to complicate it a bit.
  71. Let's replace number_in_bin with the proportion of the peak number_in_bin.
  72. Now we multiply by the number of columns that we want a bar in our bar graph at most to take up, in this case, 60 columns.
  73. Here's the fun part: this idea comes from a blog post by by Bernd Kuennen (http://154pm.blogspot.com/2008/01/generating-daily-usage-statistics.html)
  74. And that gives us a histogram graph.
  75. Here’s a better picture. Notice that, after the bin with a top of 29, everything else is empty. Only the first 8 bins have any data in them and there are 41 bins altogether. That’s a whole lot of empty bins. That is because the default is to fit 6 hours into the first 40 bins and the longest we ran was 29 milliseconds or under. As a result, every bin between 29 milliseconds and 6 hours is empty.
  76. We can provide a tighter bound than 6 hours by modifying what is called the “template” of the histogram. We do this by creating a histogram template in the database with a new largest bin value to use instead of 6 hours. In this case, I chose 44 milliseconds. Then we tell the service class to use the template by altering it and specifying our template as the lifetime histogram template for that service class. Then we need to collect stats once more to make the change take effect.
  77. You may have noticed that the bins aren’t all the same size. This is deliberate and I will talk about that in a bit, but one of the consequences that concerns us now is that when you reduce the top of the highest bin with something tiny like 44 milliseconds, several of your smallest bins now have TOP values that are “one point something” and since they are all integers they get rounded down to 1. So you get multiple bins with the same TOP. Only the first of those bins has any data put in it. It’s not pretty to see all those duplicates, so you can add a GROUP BY on the TOP column and put an aggregating function on the NUMBER_IN_BIN to make it look better.
  78. Here we’ve added an aggregating function and a GROUP BY and we now see the histogram with a highest bin top of 44. Now almost every bin contains data. It can be useful to fit the histogram to your data to get better precision as we’ve done here, but remember to leave some room to cover any surprises.
  79. If you don’t leave room, the surprises end up in what is called the “catch-all” bin. This bin is the one marked with a TOP of -1. A non-zero value in this bin alerts you that you need to modify your histogram template to have a higher top bin value. For help in choosing a good top bin value, you can use the COORD_ACT_LIFETIME_TOP high watermark for lifetime histograms and it should work fairly well for execution time histograms too. For estimated cost histograms, you can use the COST_ESTIMATE_TOP high watermark.
  80. DB2 histogram bins are not all the same size – they increase exponentially This is because of the nature of the data The smallest activities finish in milliseconds, the longest in many hours Imagine if all bins were the same size High bin value is 6 hours
  81. 6 hours / 40 bins = 9 minutes per bin The smallest queries had response times in tens of milliseconds The histogram we visualized earlier would have all data in the first bin and nothing in the other bins
  82. A service level agreement (SLA) formally defines the level of service in a service contract It often contains performance metrics such as throughput or response time requirements Sometimes, it is specified as just an average Other times, it is expressed as “X% of activities must finish with Y minutes” e.g. “95% of activities must finish within 25 seconds”. Remember this example SLA since we’ll come back to it later.
  83. We can use the activity lifetime histogram to easily see if we are meeting our SLA. First we convert NUMBER_IN_BIN to a percentage of the total number in the histogram. Then we sum the counts in each bin with those of all the bins that came before it. That will give us a cumulative percentage.
  84. Let’s go back to the query we used earlier and modify it to allow us to measure against an SLA.
  85. Here we are scaling the NUMBER_IN_BIN into a PERCENTAGE_IN_BIN…
  86. Then we add another column called CUMULATIVE_PERCENTAGE and we’ll filter out the “catch-all” bin.
  87. Here’s what we get. Let’s see if activities are meeting our SLA. If you recall, our SLA was 95% of activities finish within 25 seconds.
  88. We see in the text highlighted in blue that only 53.99% of activities are finishing within 25.157 seconds rather than 95%, so these activities are not meeting their SLA.
  89. If you found this talk interesting, there are three articles that I wrote on developerWorks on which I based these slides. If you remember anything about this talk, I hope that you remember that the distribution of your data is important, or else you’d see 200 ft giants walking around and most of us would be 1 foot tall. I hope you remember that when Bill Gates joins a crowd, he drastically changes the crowd’s net worth, but a histogram let’s us get back to the real data. Finally, I hope you remember that histograms are as easy to combine together as the batting averages of two baseball greats.