SlideShare ist ein Scribd-Unternehmen logo
1 von 21
PerfView
Measure and Improve Your App’s Performance
for Free
Sasha Goldshtein
CTO, Sela Group
@goldshtn
1
InfoQ.com: News & Community Site
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
perfview-net
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon London
www.qconlondon.com
Performance
metrics and
simulations
Development-
time profiling
Performance
and load tests
Production-
time
performance
investigations
Continuous
low-overhead
monitoring
2
One Production Performance Investigation
• Customer pain point:
• Very infrequently, user requests that save and load files are failing
• “Detailed” performance monitoring report (1 day):
• Average storage array latency is 5ms, so there’s no problem
• “Super-detailed” performance monitoring report (3 days):
• Per-minute average storage array latency numbers
• Average of averages is 5ms, so there’s no problem
3
Use a Profiler
4
Problems with Traditional Profilers
• Invasiveness
• Overhead
• Trace size
• Licensing costs
5
Event Tracing for Windows (ETW)
• High-performance logging framework with structured payloads and
stack trace support
• Used widely across Windows, .NET, drivers, services, and more
6
ETW Roles
ProvidersProvidersProviders
ProvidersProvidersConsumers
ProvidersControllers
Event tracing session
events
Log filesevents
real-time logged
events
buffers
7
Some Interesting Providers
• Kernel Sample (Profile) provider
• Produces a call stack every 1ms of CPU execution time
• CLR GC and SampAlloc provider
• Produces events for garbage collections and object allocation samples
• Kernel Context Switch provider
• Produces events for context switches, enables tracking off- and on-CPU
transitions (thread blocked time)
• Kernel FileIO provider
• Produces events for each file I/O operation and its duration
8
What’s In An ETW Recording?
• A huge list of events, think millions
• Events have multiple columns (payload), think Excel spreadsheet
• Useless without additional processing
9
PerfView
• ETW collection and analysis tool authored by Vance Morrison of the
Microsoft .NET team
• Huge variety of performance investigation scenarios
• Steep(ish) learning curve
• Watch training videos!
10
Demo: Using PerfView for CPU
and blocked time investigations
11
Sidebar: It’s All In The Visualization
12
Demo: Using PerfView to
investigate startup performance
13
Demo: Using PerfView to reduce
memory allocations
14
Memory Analysis with PerfView
• PerfView can capture optimized heap snapshots
• Sampling, spanning tree generation, object content dropping
• Compare snapshots to determine which objects are being allocated
and not freed
• Determine which GC root paths keep objects alive
15
Demo: Using PerfView to
diagnose a memory leak
16
Summary
• ETW is the performance monitoring framework of today and the
future
• PerfView is a free, universal analysis tool for CPU, memory, and
thread time investigations
• Detailed performance monitoring in production is possible and
required
17
Thank You!
Sasha Goldshtein
@goldshtn
18
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
perfview-net

Weitere ähnliche Inhalte

Mehr von C4Media

Mehr von C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
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
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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 ...
 
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
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

PerfView: The Ultimate .NET Performance Tool

  • 1. PerfView Measure and Improve Your App’s Performance for Free Sasha Goldshtein CTO, Sela Group @goldshtn 1
  • 2. InfoQ.com: News & Community Site Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ perfview-net • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon London www.qconlondon.com
  • 4. Performance metrics and simulations Development- time profiling Performance and load tests Production- time performance investigations Continuous low-overhead monitoring 2
  • 5. One Production Performance Investigation • Customer pain point: • Very infrequently, user requests that save and load files are failing • “Detailed” performance monitoring report (1 day): • Average storage array latency is 5ms, so there’s no problem • “Super-detailed” performance monitoring report (3 days): • Per-minute average storage array latency numbers • Average of averages is 5ms, so there’s no problem 3
  • 7. Problems with Traditional Profilers • Invasiveness • Overhead • Trace size • Licensing costs 5
  • 8. Event Tracing for Windows (ETW) • High-performance logging framework with structured payloads and stack trace support • Used widely across Windows, .NET, drivers, services, and more 6
  • 9. ETW Roles ProvidersProvidersProviders ProvidersProvidersConsumers ProvidersControllers Event tracing session events Log filesevents real-time logged events buffers 7
  • 10. Some Interesting Providers • Kernel Sample (Profile) provider • Produces a call stack every 1ms of CPU execution time • CLR GC and SampAlloc provider • Produces events for garbage collections and object allocation samples • Kernel Context Switch provider • Produces events for context switches, enables tracking off- and on-CPU transitions (thread blocked time) • Kernel FileIO provider • Produces events for each file I/O operation and its duration 8
  • 11. What’s In An ETW Recording? • A huge list of events, think millions • Events have multiple columns (payload), think Excel spreadsheet • Useless without additional processing 9
  • 12. PerfView • ETW collection and analysis tool authored by Vance Morrison of the Microsoft .NET team • Huge variety of performance investigation scenarios • Steep(ish) learning curve • Watch training videos! 10
  • 13. Demo: Using PerfView for CPU and blocked time investigations 11
  • 14. Sidebar: It’s All In The Visualization 12
  • 15. Demo: Using PerfView to investigate startup performance 13
  • 16. Demo: Using PerfView to reduce memory allocations 14
  • 17. Memory Analysis with PerfView • PerfView can capture optimized heap snapshots • Sampling, spanning tree generation, object content dropping • Compare snapshots to determine which objects are being allocated and not freed • Determine which GC root paths keep objects alive 15
  • 18. Demo: Using PerfView to diagnose a memory leak 16
  • 19. Summary • ETW is the performance monitoring framework of today and the future • PerfView is a free, universal analysis tool for CPU, memory, and thread time investigations • Detailed performance monitoring in production is possible and required 17
  • 21. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ perfview-net