SlideShare a Scribd company logo
1 of 33
Download to read offline
• Motivation
• Hierarchy of self-monitoring
• CPU profiling
• GC monitoring
• Heap analysis
• Deadlock detection
• Why monitor?
• Why monitor?
• Why monitor?
• Why our own?
• Why monitor?
• Why our own?
• Why monitor?
• Why our own?
• Why monitor?
• Why our own?
• Use a hierarchical monitoring strategy
• Use a hierarchical monitoring strategy
• Lightweight for continuous and frequent monitoring
of all basics
Performance counters
• Use a hierarchical monitoring strategy
• Lightweight for continuous and frequent monitoring
of all basics
Performance counters
• Medium for less frequency events
ETW ClrMD
• Use a hierarchical monitoring strategy
• Lightweight for continuous and frequent monitoring
of all basics
Performance counters
• Medium for less frequency events
ETW ClrMD
• Invasive for deep-dive and concrete diagnostics
CLR Profiling API CLR Debugging API
Let’s Get to Business
• Monitor CPU using performance counters
• Are we above a certain threshold for a certain
amount of time?
LiveStacks
• AuthenticationController takes 95% CPU,
maybe we're being DDoS'ed
• Image processing component takes 100% CPU, need
to auto-scale the app
• Encoding this 30 second video takes 3 minutes at
100% CPU, tell the user she can send us a bug report
CPU Spikes
Demo
• Monitor GC performance using performance
counters
• Register on ETW’s GC events such as
GCAllocationTick
• Attach ClrMD to get heap breakdown
Allocation
Spikes
Demo
• Monitor memory usage using performance counters
• Has memory increased above a certain threshold for
a certain time?
Find a Leak
Demo
• Monitor for potential deadlock
• Attach ClrMD to create wait chains and detect
deadlocks
• Report, try to break, pray for a miracle…
Detect a
Deadlock
Demo
• Many more scenarios are possible
• Many more scenarios are possible
• Monitor heap fragmentation and compact large
objects if needed
• Many more scenarios are possible
• Monitor heap fragmentation and compact large
objects if needed
• Native memory leak analysis using ETW
• The pros are obvious (visibility, easy scaling…)
• The pros are obvious (visibility, easy scaling…)
• But there are some cons as well…
• The pros are obvious (visibility, easy scaling…)
• But there are some cons as well…
• The pros are obvious (visibility, easy scaling…)
• But there are some cons as well…
• The pros are obvious (visibility, easy scaling…)
• But there are some cons as well…
• Self-monitoring is important for all kinds of software
• Best to create a hierarchy of monitoring (and
overhead and complexity)
• Lots of scenarios: CPU, GC, memory, deadlocks
• Demos: https://github.com/dinazil/self-aware-
applications
Self-Aware Applications: Automatic Production Monitoring (TechDays NL 2017)

More Related Content

Similar to Self-Aware Applications: Automatic Production Monitoring (TechDays NL 2017)

The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
jaxconf
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expert
gaoliang641
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
Abdelmonaim Remani
 

Similar to Self-Aware Applications: Automatic Production Monitoring (TechDays NL 2017) (20)

Performance tuning Grails applications
Performance tuning Grails applicationsPerformance tuning Grails applications
Performance tuning Grails applications
 
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
Jeremy Edberg (MinOps ) - How to build a solid infrastructure for a startup t...
 
Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014Performance tuning Grails Applications GR8Conf US 2014
Performance tuning Grails Applications GR8Conf US 2014
 
How to Leverage Log Data for Effective Threat Detection
How to Leverage Log Data for Effective Threat DetectionHow to Leverage Log Data for Effective Threat Detection
How to Leverage Log Data for Effective Threat Detection
 
Leandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & RightLeandro Melendez - Switching Performance Left & Right
Leandro Melendez - Switching Performance Left & Right
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
 
Observability - The good, the bad and the ugly Xp Days 2019 Kiev Ukraine
Observability -  The good, the bad and the ugly Xp Days 2019 Kiev Ukraine Observability -  The good, the bad and the ugly Xp Days 2019 Kiev Ukraine
Observability - The good, the bad and the ugly Xp Days 2019 Kiev Ukraine
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expert
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance Tuning
 
Secure Boot Under Attack: Simulation to Enhance Fault Attacks & Defenses
Secure Boot Under Attack: Simulation to Enhance Fault Attacks & DefensesSecure Boot Under Attack: Simulation to Enhance Fault Attacks & Defenses
Secure Boot Under Attack: Simulation to Enhance Fault Attacks & Defenses
 
The Economies of Scaling Software
The Economies of Scaling SoftwareThe Economies of Scaling Software
The Economies of Scaling Software
 
Cqrs+es
Cqrs+esCqrs+es
Cqrs+es
 
Cqrs+es
Cqrs+esCqrs+es
Cqrs+es
 
High Reliabilty Systems
High Reliabilty SystemsHigh Reliabilty Systems
High Reliabilty Systems
 
Performance optimization (balancer optimization)
Performance optimization (balancer optimization)Performance optimization (balancer optimization)
Performance optimization (balancer optimization)
 
Jose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release PipelineJose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release Pipeline
 
A lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous deliveryA lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous delivery
 
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
 

More from Dina Goldshtein

More from Dina Goldshtein (16)

How Does the Internet Work? (Wix she codes; branch)
How Does the Internet Work? (Wix she codes; branch)How Does the Internet Work? (Wix she codes; branch)
How Does the Internet Work? (Wix she codes; branch)
 
Look Mommy, No GC! (TechDays NL 2017)
Look Mommy, No GC! (TechDays NL 2017)Look Mommy, No GC! (TechDays NL 2017)
Look Mommy, No GC! (TechDays NL 2017)
 
ETW - Monitor Anything, Anytime, Anywhere (Velocity NYC 2017)
ETW - Monitor Anything, Anytime, Anywhere (Velocity NYC 2017)ETW - Monitor Anything, Anytime, Anywhere (Velocity NYC 2017)
ETW - Monitor Anything, Anytime, Anywhere (Velocity NYC 2017)
 
Look Mommy, no GC! (.NET Summit 2017)
Look Mommy, no GC! (.NET Summit 2017)Look Mommy, no GC! (.NET Summit 2017)
Look Mommy, no GC! (.NET Summit 2017)
 
Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)
Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)
Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)
 
Look Mommy, no GC! (BrightSource)
Look Mommy, no GC! (BrightSource)Look Mommy, no GC! (BrightSource)
Look Mommy, no GC! (BrightSource)
 
ETW - Monitor Anything, Anytime, Anywhere (NDC Oslo 2017)
ETW - Monitor Anything, Anytime, Anywhere (NDC Oslo 2017)ETW - Monitor Anything, Anytime, Anywhere (NDC Oslo 2017)
ETW - Monitor Anything, Anytime, Anywhere (NDC Oslo 2017)
 
Look Mommy, no GC! (SDP May 2017)
Look Mommy, no GC! (SDP May 2017)Look Mommy, no GC! (SDP May 2017)
Look Mommy, no GC! (SDP May 2017)
 
Look Mommy, No GC! (Codecamp Iasi 2017)
Look Mommy, No GC! (Codecamp Iasi 2017)Look Mommy, No GC! (Codecamp Iasi 2017)
Look Mommy, No GC! (Codecamp Iasi 2017)
 
Look Mommy, No GC! (NDC London 2017)
Look Mommy, No GC! (NDC London 2017)Look Mommy, No GC! (NDC London 2017)
Look Mommy, No GC! (NDC London 2017)
 
How does the Internet Work?
How does the Internet Work?How does the Internet Work?
How does the Internet Work?
 
How does the Internet Work?
How does the Internet Work?How does the Internet Work?
How does the Internet Work?
 
Things They Don’t Teach You @ School
Things They Don’t Teach You @ SchoolThings They Don’t Teach You @ School
Things They Don’t Teach You @ School
 
What's New in C++ 11/14?
What's New in C++ 11/14?What's New in C++ 11/14?
What's New in C++ 11/14?
 
HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Self-Aware Applications: Automatic Production Monitoring (TechDays NL 2017)

  • 1.
  • 2.
  • 3. • Motivation • Hierarchy of self-monitoring • CPU profiling • GC monitoring • Heap analysis • Deadlock detection
  • 6. • Why monitor? • Why our own?
  • 7. • Why monitor? • Why our own?
  • 8. • Why monitor? • Why our own?
  • 9. • Why monitor? • Why our own?
  • 10. • Use a hierarchical monitoring strategy
  • 11. • Use a hierarchical monitoring strategy • Lightweight for continuous and frequent monitoring of all basics Performance counters
  • 12. • Use a hierarchical monitoring strategy • Lightweight for continuous and frequent monitoring of all basics Performance counters • Medium for less frequency events ETW ClrMD
  • 13. • Use a hierarchical monitoring strategy • Lightweight for continuous and frequent monitoring of all basics Performance counters • Medium for less frequency events ETW ClrMD • Invasive for deep-dive and concrete diagnostics CLR Profiling API CLR Debugging API
  • 14. Let’s Get to Business
  • 15. • Monitor CPU using performance counters • Are we above a certain threshold for a certain amount of time? LiveStacks
  • 16. • AuthenticationController takes 95% CPU, maybe we're being DDoS'ed • Image processing component takes 100% CPU, need to auto-scale the app • Encoding this 30 second video takes 3 minutes at 100% CPU, tell the user she can send us a bug report
  • 18. • Monitor GC performance using performance counters • Register on ETW’s GC events such as GCAllocationTick • Attach ClrMD to get heap breakdown
  • 20. • Monitor memory usage using performance counters • Has memory increased above a certain threshold for a certain time?
  • 22. • Monitor for potential deadlock • Attach ClrMD to create wait chains and detect deadlocks • Report, try to break, pray for a miracle…
  • 24. • Many more scenarios are possible
  • 25. • Many more scenarios are possible • Monitor heap fragmentation and compact large objects if needed
  • 26. • Many more scenarios are possible • Monitor heap fragmentation and compact large objects if needed • Native memory leak analysis using ETW
  • 27. • The pros are obvious (visibility, easy scaling…)
  • 28. • The pros are obvious (visibility, easy scaling…) • But there are some cons as well…
  • 29. • The pros are obvious (visibility, easy scaling…) • But there are some cons as well…
  • 30. • The pros are obvious (visibility, easy scaling…) • But there are some cons as well…
  • 31. • The pros are obvious (visibility, easy scaling…) • But there are some cons as well…
  • 32. • Self-monitoring is important for all kinds of software • Best to create a hierarchy of monitoring (and overhead and complexity) • Lots of scenarios: CPU, GC, memory, deadlocks • Demos: https://github.com/dinazil/self-aware- applications