SlideShare a Scribd company logo
1 of 29
Craig Shallahamer
craig@orapub.com
How To Build A Poor
Performance
Detector Using
Machine Learning
And Python
Oracle performance issues typically fall into two categories.
Either "I've seen this before and it's bad!" or "I've never seen
this before. We better check it out!"
Oracle performance issues typically fall into two categories.
Either "I've seen this before and it's bad!" or "I've never seen
this before. We better check it out!"
The good news is, a trained analyst with many years of
experience can quickly do an AWR or ASH analysis.
Oracle performance issues typically fall into two categories.
Either "I've seen this before and it's bad!" or "I've never seen
this before. We better check it out!"
The good news is, a trained analyst with many years of
experience can quickly do an AWR or ASH analysis.
The bad news is, this DOES NOT SCALE! Even an expert can't
comfortably monitor hundreds or thousands of databases.
Oracle performance issues typically fall into two categories.
Either "I've seen this before and it's bad!" or "I've never seen
this before. We better check it out!"
The good news is, a trained analyst with many years of
experience can quickly do an AWR or ASH analysis.
And our RULE BASED SYSTEMS are relatively simplistic, because
they CAN'T CAPTURE THE COMPLEXITY and diversity of
activity in a production Oracle system.
The bad news is, this DOES NOT SCALE! Even an expert can't
comfortably monitor hundreds or thousands of databases.
One solution for this unsustainable monitoring
and analysis problem is to use machine
learning.
How to apply machine learning to quickly
and automatically detect recognized poor
performance situations, all before the phone
rings, is what this presentation is all about.
One solution for this unsustainable monitoring
and analysis problem is to use machine
learning.
About Me...
• Long time Oracle DBA
• Specialize in predictive analytics, machine
learning and Oracle performance tuning
• Performance researcher
• Blogger: A Wider View About Oracle
Performance Tuning
• Author: Oracle Performance Firefighting and
Forecasting Oracle Performance.
• Conference speaker
• Teacher and mentor
• Oracle ACE Director
• Quest/IOUG DBA Track Manager
OraPub works with
Oracle DBAs
empowering them to
beat bots, AI,
machine learning
and autonomous
anything.
OraPub works with
IT to deploy machine
learning into their
monitoring and
alerting processes.
https://www.orapub.com/ml-ecourse
OraPub LVCs Are Specifically Designed For DBAs
Learn -> Do -> Review -> Repeat
You learn to master the topic at a deeper, higher confidence and more practical level
compared to any other teaching method I offer.
This occurs because the class is spread out over multiple weeks, each session is 2
hours with a day in between, you do homework/activation on your real systems and I
personally work with you through the entire class.
Details & Registration: www.orapub.com/lvc
Event Calendar: https://www.orapub.com/events
Want my updated
slides?
www.orapub.com/members >
Tools & Presentations
Let's do some
Machine learning
Supervised and
Unsupervised Learning
Supervised Vs Un-Supervised
snap_id uc_psec aas trx_psec
1001 2500 34.25 9.45
1002 1200 14.50 6.50
1003 1150 16.50 16.50
1004 1250 18.50 9.50
1005 1300 24.50 2.50
Un-Supervised
snap_id uc_psec aas trx_psec perf
1001 2500 34.25 9.45 bad
1002 1200 14.50 6.50 good
1003 1150 16.50 16.50 good
1004 1250 18.50 9.50 good
1005 1300 24.50 2.50 ????
Supervised
Label
Is snap_id 1005 anomalous?
Will snap_id 1005 result in
"the phone ringing?"
Notice the difference?
We may know a duck means "bad performance" or perhaps you'll say,
"I've never seen a hedge hog before!"
In unsupervised learning (UML), no labels are provided, and the learning algorithm
focuses solely on detecting structure, in unlabeled "feature" data.
Supervised Learning
With
Decision Trees
Sample # AAS CPU % Performance
1 4 20 Good
2 6 20 Good
3 10 50 Bad
4 14 60 Bad
5 12 54 Good
Training Data: Features and Label
Craig's Decision Tree Algorithm Rules
1. Decisions based on features going left to right, round-
robin.
2. Decision value is the remaining sample's feature data,
(high+low)/2
3. Condition is less-than
4. Y branch left, N branch right
AAS < 9 (14+4)/2)
N
Y
1 2
G G
3 4 5
B B G
CPU% < 55 (60+50)/2)
N
Y
3 5
B G
4
B
AAS < 11 (10+12)/2)
N
Y
3
B
5
G
# AAS CPU % Perf?
1 4 20 Good
2 6 20 Good
3 10 50 Bad
4 14 60 Bad
5 12 54 Good
Training Data
BUILDING The Tree
AAS < 9 (14+4)/2)
N
Y
1 2
G G
3 4 5
B B G
CPU% < 55 (60+50)/2)
N
Y
3 5
B G
4
B
AAS < 11 (10+12)/2)
N
Y
3
B
5
G
# AAS CPU % Perf?
1 4 20 Good
2 6 20 Good
3 10 50 Bad
4 14 60 Bad
5 12 54 Good
Training Data
SAVING The Tree
If AAS < 9
Then Good
Else If CPU% < 55
Then if AAS < 11
then Bad
else Good
Else Bad
Test Data
If AAS < 9
Then Good
Else If CPU% < 55
Then if AAS < 11
then Bad
else Good
Else Bad
# AAS
CPU
%
Actual
Perf?
Pred
Perf?
1 20 70 Bad Bad
2 10 40 Good Bad
3 11 60 Bad Bad
4 5 80 Bad Good
5 25 40 Good Good
Testing The Tree Accuracy
# Correct
Accuracy = ---------
# Samples
= 3 / 5
= 0.60
= 60%
But what if missing a "bad"
situation is much more
important than missing a
"good" situation?
How to make our model better?
• Standardize feature data.
• Use the minimum and only most powerful
features.
• Perhaps use ASH data.
• Address the "rare event" reality.
• Try other models.
• Tune the best model.
• …
Let The Typing
Begin
To Set Up Your Machine Learning Environment:
https://www.orapub.com/members >
Tools & Presentations > Presentations >
ML Poor Perf > 2021-02-RMOUG-ML-PoorPerf.txt
``
G o i n g
D e e p e r
https://www.orapub.com/ml-ecourse
Resource listing
• OraPub Membership for premium content
– "How To" Webinars – two each month. Over 120 recorded!!
– Video Seminars – any device, any time, high quality
– 20% LVC discounts!
– Learning paths, mentoring, assessments and certificates, priority response
– SLACK forum exclusively for paid members
• Live Virtual Classroom (LVC) Training
– ML 1 – Anomaly Detection & Deployment
– ML 2 – Performance Prediction & Deployment
– Tuning Oracle Using An AWR Report
– Tuning Oracle Using Active Session History (ASH) Strategies
• Toolkits – Many tools available at orapub.com
• Craig’s Blog & Website – Search: “uowtba”, “queue”
• Presentations – www.orapub.com
• Books: Oracle Performance Firefighting. Forecasting Oracle Performance.
OraPub LVCs Are Specifically Designed For DBAs
Learn -> Do -> Review -> Repeat
You learn to master the topic at a deeper, higher confidence and more practical level
compared to any other teaching method I offer.
This occurs because the class is spread out over multiple weeks, each session is 2
hours with a day in between, you do homework/activation on your real systems and I
personally work with you through the entire class.
Details & Registration: www.orapub.com/lvc
Event Calendar: https://www.orapub.com/events
OraPub LVCs Are Specifically Designed For DBAs
Learn -> Do -> Review -> Repeat
You learn to master the topic at a deeper, higher confidence and more practical level
compared to any other teaching method I offer.
This occurs because the class is spread out over multiple weeks, each session is 2
hours with a day in between, you do homework/activation on your real systems and I
personally work with you through the entire class.
Details & Registration: www.orapub.com/lvc
Event Calendar: https://www.orapub.com/events
Craig Shallahamer
craig@orapub.com
How To Build A Poor
Performance
Detector Using
Machine Learning
And Python

More Related Content

Similar to ZcCsXvjIRFKcqd2Yzt4d_Shallahamer-MLPoorPerf-3d.pdf

Scalablity and benchmark in mysql performance
Scalablity and benchmark in mysql performanceScalablity and benchmark in mysql performance
Scalablity and benchmark in mysql performanceAmrendra Kumar
 
scjp 5 preparation guide
scjp 5 preparation guidescjp 5 preparation guide
scjp 5 preparation guideGanesh P
 
How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?Sergey Korol
 
Continues Deployment - Tech Talk week
Continues Deployment - Tech Talk weekContinues Deployment - Tech Talk week
Continues Deployment - Tech Talk weekrantav
 
DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015Yuval Yeret
 
Agile riga jelena_scicko_v3
Agile riga jelena_scicko_v3Agile riga jelena_scicko_v3
Agile riga jelena_scicko_v3jelescic
 
Sumo Logic Cert Jam - Search Mastery
Sumo Logic Cert Jam - Search MasterySumo Logic Cert Jam - Search Mastery
Sumo Logic Cert Jam - Search MasterySumo Logic
 
Performing Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEXPerforming Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEXDatavail
 
7 (+/- 2) Steps to Agility
7 (+/- 2) Steps to Agility7 (+/- 2) Steps to Agility
7 (+/- 2) Steps to AgilityTim Gifford
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementMark Matthews
 
Biwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on labBiwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on labCharlie Berger
 
OCAJP 7 and OCPJP 7 certifications
OCAJP 7 and OCPJP 7 certificationsOCAJP 7 and OCPJP 7 certifications
OCAJP 7 and OCPJP 7 certificationsGanesh Samarthyam
 
OCAJP 7 Preparation Tips
OCAJP 7 Preparation TipsOCAJP 7 Preparation Tips
OCAJP 7 Preparation TipsGanesh P
 
Scaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without FearScaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without FearTechWell
 
How to clear java certification?
How to clear java certification?How to clear java certification?
How to clear java certification?Avinash Bikumalla
 
Rapid usability testing
Rapid usability testingRapid usability testing
Rapid usability testinglisarex
 

Similar to ZcCsXvjIRFKcqd2Yzt4d_Shallahamer-MLPoorPerf-3d.pdf (20)

Scalablity and benchmark in mysql performance
Scalablity and benchmark in mysql performanceScalablity and benchmark in mysql performance
Scalablity and benchmark in mysql performance
 
scjp 5 preparation guide
scjp 5 preparation guidescjp 5 preparation guide
scjp 5 preparation guide
 
How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?How does Java 8 exert hidden power on Test Automation?
How does Java 8 exert hidden power on Test Automation?
 
Continues Deployment - Tech Talk week
Continues Deployment - Tech Talk weekContinues Deployment - Tech Talk week
Continues Deployment - Tech Talk week
 
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
JavaCro'15 - Java Certification – in theory and practice - Branko Mihaljević,...
 
DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015
 
Agile riga jelena_scicko_v3
Agile riga jelena_scicko_v3Agile riga jelena_scicko_v3
Agile riga jelena_scicko_v3
 
Sumo Logic Cert Jam - Search Mastery
Sumo Logic Cert Jam - Search MasterySumo Logic Cert Jam - Search Mastery
Sumo Logic Cert Jam - Search Mastery
 
Performing Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEXPerforming Oracle Health Checks Using APEX
Performing Oracle Health Checks Using APEX
 
7 (+/- 2) Steps to Agility
7 (+/- 2) Steps to Agility7 (+/- 2) Steps to Agility
7 (+/- 2) Steps to Agility
 
Unit testing hippo
Unit testing hippoUnit testing hippo
Unit testing hippo
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 
Biwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on labBiwa summit 2015 oaa oracle data miner hands on lab
Biwa summit 2015 oaa oracle data miner hands on lab
 
OCAJP 7 and OCPJP 7 certifications
OCAJP 7 and OCPJP 7 certificationsOCAJP 7 and OCPJP 7 certifications
OCAJP 7 and OCPJP 7 certifications
 
OCAJP 7 Preparation Tips
OCAJP 7 Preparation TipsOCAJP 7 Preparation Tips
OCAJP 7 Preparation Tips
 
Scaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without FearScaling Your Tests: Continued Change Without Fear
Scaling Your Tests: Continued Change Without Fear
 
AshwiniCV- SAP Basis
AshwiniCV- SAP BasisAshwiniCV- SAP Basis
AshwiniCV- SAP Basis
 
How to clear java certification?
How to clear java certification?How to clear java certification?
How to clear java certification?
 
Methods&tools
Methods&tools Methods&tools
Methods&tools
 
Rapid usability testing
Rapid usability testingRapid usability testing
Rapid usability testing
 

More from cookie1969

200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DB200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DBcookie1969
 
active_session_history_oracle_performance.ppt
active_session_history_oracle_performance.pptactive_session_history_oracle_performance.ppt
active_session_history_oracle_performance.pptcookie1969
 
dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...
dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...
dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...cookie1969
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfcookie1969
 
Kyle Hailey Oracle Performance IO Waits
Kyle Hailey  Oracle Performance IO WaitsKyle Hailey  Oracle Performance IO Waits
Kyle Hailey Oracle Performance IO Waitscookie1969
 
Pivot query on Automatic Workload Repository _ OraDBA.pdf
Pivot query on Automatic Workload Repository _ OraDBA.pdfPivot query on Automatic Workload Repository _ OraDBA.pdf
Pivot query on Automatic Workload Repository _ OraDBA.pdfcookie1969
 
R07_Senegacnik_CBO.pdf
R07_Senegacnik_CBO.pdfR07_Senegacnik_CBO.pdf
R07_Senegacnik_CBO.pdfcookie1969
 
IO_Analysis_with_SAR.ppt
IO_Analysis_with_SAR.pptIO_Analysis_with_SAR.ppt
IO_Analysis_with_SAR.pptcookie1969
 
02062022_ASH_Bazgutdinov_FORS.pdf
02062022_ASH_Bazgutdinov_FORS.pdf02062022_ASH_Bazgutdinov_FORS.pdf
02062022_ASH_Bazgutdinov_FORS.pdfcookie1969
 
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfNOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfcookie1969
 

More from cookie1969 (10)

200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DB200603ash.pdf Performance Tuning Oracle DB
200603ash.pdf Performance Tuning Oracle DB
 
active_session_history_oracle_performance.ppt
active_session_history_oracle_performance.pptactive_session_history_oracle_performance.ppt
active_session_history_oracle_performance.ppt
 
dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...
dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...
dokumen.tips_oracle-10g-advanced-performance-tuning-kyle-hailey-kylelfgmailco...
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdfHailey_Database_Performance_Made_Easy_through_Graphics.pdf
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
 
Kyle Hailey Oracle Performance IO Waits
Kyle Hailey  Oracle Performance IO WaitsKyle Hailey  Oracle Performance IO Waits
Kyle Hailey Oracle Performance IO Waits
 
Pivot query on Automatic Workload Repository _ OraDBA.pdf
Pivot query on Automatic Workload Repository _ OraDBA.pdfPivot query on Automatic Workload Repository _ OraDBA.pdf
Pivot query on Automatic Workload Repository _ OraDBA.pdf
 
R07_Senegacnik_CBO.pdf
R07_Senegacnik_CBO.pdfR07_Senegacnik_CBO.pdf
R07_Senegacnik_CBO.pdf
 
IO_Analysis_with_SAR.ppt
IO_Analysis_with_SAR.pptIO_Analysis_with_SAR.ppt
IO_Analysis_with_SAR.ppt
 
02062022_ASH_Bazgutdinov_FORS.pdf
02062022_ASH_Bazgutdinov_FORS.pdf02062022_ASH_Bazgutdinov_FORS.pdf
02062022_ASH_Bazgutdinov_FORS.pdf
 
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfNOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
 

Recently uploaded

LANDMARKS AND MONUMENTS IN NIGERIA.pptx
LANDMARKS  AND MONUMENTS IN NIGERIA.pptxLANDMARKS  AND MONUMENTS IN NIGERIA.pptx
LANDMARKS AND MONUMENTS IN NIGERIA.pptxBasil Achie
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxFamilyWorshipCenterD
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfhenrik385807
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )Pooja Nehwal
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxmavinoikein
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)Basil Achie
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptssuser319dad
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...NETWAYS
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSebastiano Panichella
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...NETWAYS
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...NETWAYS
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Pooja Nehwal
 

Recently uploaded (20)

LANDMARKS AND MONUMENTS IN NIGERIA.pptx
LANDMARKS  AND MONUMENTS IN NIGERIA.pptxLANDMARKS  AND MONUMENTS IN NIGERIA.pptx
LANDMARKS AND MONUMENTS IN NIGERIA.pptx
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
 
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Vaishnavi 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Vaishnavi 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Work Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptxWork Remotely with Confluence ACE 2.pptx
Work Remotely with Confluence ACE 2.pptx
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.ppt
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
 

ZcCsXvjIRFKcqd2Yzt4d_Shallahamer-MLPoorPerf-3d.pdf

  • 1. Craig Shallahamer craig@orapub.com How To Build A Poor Performance Detector Using Machine Learning And Python
  • 2. Oracle performance issues typically fall into two categories. Either "I've seen this before and it's bad!" or "I've never seen this before. We better check it out!"
  • 3. Oracle performance issues typically fall into two categories. Either "I've seen this before and it's bad!" or "I've never seen this before. We better check it out!" The good news is, a trained analyst with many years of experience can quickly do an AWR or ASH analysis.
  • 4. Oracle performance issues typically fall into two categories. Either "I've seen this before and it's bad!" or "I've never seen this before. We better check it out!" The good news is, a trained analyst with many years of experience can quickly do an AWR or ASH analysis. The bad news is, this DOES NOT SCALE! Even an expert can't comfortably monitor hundreds or thousands of databases.
  • 5. Oracle performance issues typically fall into two categories. Either "I've seen this before and it's bad!" or "I've never seen this before. We better check it out!" The good news is, a trained analyst with many years of experience can quickly do an AWR or ASH analysis. And our RULE BASED SYSTEMS are relatively simplistic, because they CAN'T CAPTURE THE COMPLEXITY and diversity of activity in a production Oracle system. The bad news is, this DOES NOT SCALE! Even an expert can't comfortably monitor hundreds or thousands of databases.
  • 6. One solution for this unsustainable monitoring and analysis problem is to use machine learning.
  • 7. How to apply machine learning to quickly and automatically detect recognized poor performance situations, all before the phone rings, is what this presentation is all about. One solution for this unsustainable monitoring and analysis problem is to use machine learning.
  • 8. About Me... • Long time Oracle DBA • Specialize in predictive analytics, machine learning and Oracle performance tuning • Performance researcher • Blogger: A Wider View About Oracle Performance Tuning • Author: Oracle Performance Firefighting and Forecasting Oracle Performance. • Conference speaker • Teacher and mentor • Oracle ACE Director • Quest/IOUG DBA Track Manager
  • 9. OraPub works with Oracle DBAs empowering them to beat bots, AI, machine learning and autonomous anything. OraPub works with IT to deploy machine learning into their monitoring and alerting processes.
  • 11. OraPub LVCs Are Specifically Designed For DBAs Learn -> Do -> Review -> Repeat You learn to master the topic at a deeper, higher confidence and more practical level compared to any other teaching method I offer. This occurs because the class is spread out over multiple weeks, each session is 2 hours with a day in between, you do homework/activation on your real systems and I personally work with you through the entire class. Details & Registration: www.orapub.com/lvc Event Calendar: https://www.orapub.com/events
  • 15. Supervised Vs Un-Supervised snap_id uc_psec aas trx_psec 1001 2500 34.25 9.45 1002 1200 14.50 6.50 1003 1150 16.50 16.50 1004 1250 18.50 9.50 1005 1300 24.50 2.50 Un-Supervised snap_id uc_psec aas trx_psec perf 1001 2500 34.25 9.45 bad 1002 1200 14.50 6.50 good 1003 1150 16.50 16.50 good 1004 1250 18.50 9.50 good 1005 1300 24.50 2.50 ???? Supervised Label Is snap_id 1005 anomalous? Will snap_id 1005 result in "the phone ringing?"
  • 16. Notice the difference? We may know a duck means "bad performance" or perhaps you'll say, "I've never seen a hedge hog before!" In unsupervised learning (UML), no labels are provided, and the learning algorithm focuses solely on detecting structure, in unlabeled "feature" data.
  • 18. Sample # AAS CPU % Performance 1 4 20 Good 2 6 20 Good 3 10 50 Bad 4 14 60 Bad 5 12 54 Good Training Data: Features and Label Craig's Decision Tree Algorithm Rules 1. Decisions based on features going left to right, round- robin. 2. Decision value is the remaining sample's feature data, (high+low)/2 3. Condition is less-than 4. Y branch left, N branch right
  • 19. AAS < 9 (14+4)/2) N Y 1 2 G G 3 4 5 B B G CPU% < 55 (60+50)/2) N Y 3 5 B G 4 B AAS < 11 (10+12)/2) N Y 3 B 5 G # AAS CPU % Perf? 1 4 20 Good 2 6 20 Good 3 10 50 Bad 4 14 60 Bad 5 12 54 Good Training Data BUILDING The Tree
  • 20. AAS < 9 (14+4)/2) N Y 1 2 G G 3 4 5 B B G CPU% < 55 (60+50)/2) N Y 3 5 B G 4 B AAS < 11 (10+12)/2) N Y 3 B 5 G # AAS CPU % Perf? 1 4 20 Good 2 6 20 Good 3 10 50 Bad 4 14 60 Bad 5 12 54 Good Training Data SAVING The Tree If AAS < 9 Then Good Else If CPU% < 55 Then if AAS < 11 then Bad else Good Else Bad
  • 21. Test Data If AAS < 9 Then Good Else If CPU% < 55 Then if AAS < 11 then Bad else Good Else Bad # AAS CPU % Actual Perf? Pred Perf? 1 20 70 Bad Bad 2 10 40 Good Bad 3 11 60 Bad Bad 4 5 80 Bad Good 5 25 40 Good Good Testing The Tree Accuracy # Correct Accuracy = --------- # Samples = 3 / 5 = 0.60 = 60% But what if missing a "bad" situation is much more important than missing a "good" situation?
  • 22. How to make our model better? • Standardize feature data. • Use the minimum and only most powerful features. • Perhaps use ASH data. • Address the "rare event" reality. • Try other models. • Tune the best model. • …
  • 23. Let The Typing Begin To Set Up Your Machine Learning Environment: https://www.orapub.com/members > Tools & Presentations > Presentations > ML Poor Perf > 2021-02-RMOUG-ML-PoorPerf.txt
  • 24. `` G o i n g D e e p e r
  • 26. Resource listing • OraPub Membership for premium content – "How To" Webinars – two each month. Over 120 recorded!! – Video Seminars – any device, any time, high quality – 20% LVC discounts! – Learning paths, mentoring, assessments and certificates, priority response – SLACK forum exclusively for paid members • Live Virtual Classroom (LVC) Training – ML 1 – Anomaly Detection & Deployment – ML 2 – Performance Prediction & Deployment – Tuning Oracle Using An AWR Report – Tuning Oracle Using Active Session History (ASH) Strategies • Toolkits – Many tools available at orapub.com • Craig’s Blog & Website – Search: “uowtba”, “queue” • Presentations – www.orapub.com • Books: Oracle Performance Firefighting. Forecasting Oracle Performance.
  • 27. OraPub LVCs Are Specifically Designed For DBAs Learn -> Do -> Review -> Repeat You learn to master the topic at a deeper, higher confidence and more practical level compared to any other teaching method I offer. This occurs because the class is spread out over multiple weeks, each session is 2 hours with a day in between, you do homework/activation on your real systems and I personally work with you through the entire class. Details & Registration: www.orapub.com/lvc Event Calendar: https://www.orapub.com/events
  • 28. OraPub LVCs Are Specifically Designed For DBAs Learn -> Do -> Review -> Repeat You learn to master the topic at a deeper, higher confidence and more practical level compared to any other teaching method I offer. This occurs because the class is spread out over multiple weeks, each session is 2 hours with a day in between, you do homework/activation on your real systems and I personally work with you through the entire class. Details & Registration: www.orapub.com/lvc Event Calendar: https://www.orapub.com/events
  • 29. Craig Shallahamer craig@orapub.com How To Build A Poor Performance Detector Using Machine Learning And Python