Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

.NET Fest 2017. Martin Kulov. Treasure Hunt: Finding your application hot spot

130 views

Published on

Premature optimization is the root of all evil, they say. So we end up not doing it at all. In this session, you will learn how to detect early smells for slowness, troubleshoot performance issues in production and under heavy load, on premise and in the cloud. If you wonder whether to use sampling or instrumenting profiler, perf counters or ETW, and to generally approach any performance problem then this session is for you.

Published in: Education
  • Be the first to comment

  • Be the first to like this

.NET Fest 2017. Martin Kulov. Treasure Hunt: Finding your application hot spot

  1. 1. Kiev 2017 Only real cases. Only actual trends. Treasure Hunt: Finding your application hotspot Martin Kulov Association of Software Engineers
  2. 2. Kiev 2017 Only real cases. Only actual trends. It is a DevOps world! Treasure Hunt: inding your application hotspot
  3. 3. <show visual DevOps> Treasure Hunt: Finding your application hotspot
  4. 4. Kiev 2017 Agile Software Development
  5. 5. Kiev 2017 Continuous Delivery Emerging Architecture Agile Software Development Continuous Testing Continuous Deployment Continuous Monitoring
  6. 6. Kiev 2017 Continuous Testing Shift Left Team Responsibility Everyone is Developer Involved
  7. 7. Kiev 2017 Performance Testing … is still Testing Team is responsible That means… YOU
  8. 8. Kiev 2017 Three Types of Perf Testing Debugging Profiling Monitoring Each requires different tools 
  9. 9. Kiev 2017 Only real cases. Only actual trends. Before we start…
  10. 10. Kiev 2017 Simple Checklist Isolate the cause CPU Memory Network Disk Locate the root cause Provide fix
  11. 11. Kiev 2017 General Guidelines Start measures as early as possible Set up Source Symbols Use Release build Beware of the observer effect
  12. 12. Kiev 2017 Only real cases. Only actual trends. What are Source Symbols?
  13. 13. Kiev 2017 Program Database Files (PDB) Generated on build Contains metadata about unmanaged code Contains location of the source code Files should be published to symbol server
  14. 14. Kiev 2017 Microsoft Symbol Server Contains PDBs for Windows https://msdl.microsoft.com/download/symbols Moved to Azure based store “backed by a more robust publishing pipeline” SET _NT_SYMBOL_PATH=srv*DownstreamStore*https:// msdl.microsoft.com/download/symbols
  15. 15. Kiev 2017 Only real cases. Only actual trends. DEMO: Configure use of Symbol Server
  16. 16. Kiev 2017 Only real cases. Only actual trends. Debug vs Release
  17. 17. Kiev 2017
  18. 18. Kiev 2017 Only real cases. Only actual trends. The Observer Effect
  19. 19. Kiev 2017 Only real cases. Only actual trends. “a heisenbug is a software bug that seems to disappear or alter its behavior when one attempts to study it.”
  20. 20. Kiev 2017 Examples Debugger Profiler VS Host process VS Test process
  21. 21. Kiev 2017 Only real cases. Only actual trends. Debugging Performance
  22. 22. Kiev 2017 Debugging Performance SolarLint Code Analysis PerfTips Diagnostic Tools
  23. 23. Kiev 2017 SonarLint
  24. 24. Kiev 2017 Code Analysis
  25. 25. Kiev 2017 PerfTips Performance measures while debugging Run To Cursor (Ctrl+F10) Take Multiple Measurements
  26. 26. Kiev 2017 Diagnostic Tools Use Event Tracing for Windows (ETW) ETW provides call stack Samples from function entry and exit points
  27. 27. Kiev 2017 Only real cases. Only actual trends. DEMO: Debugging Performance
  28. 28. Kiev 2017 Only real cases. Only actual trends. Profiling Performance
  29. 29. Kiev 2017 Profiling Performance Visual Studio Profiler Visual Studio Stand Alone Profiler CLR Profiler Collect data under load
  30. 30. Kiev 2017 Only real cases. Only actual trends. Sampling vs Instrumenting
  31. 31. Kiev 2017 Sampling Profiler Non obtrusive CPU execution samples Memory footprint samples
  32. 32. Kiev 2017 Instrumenting Profiler Obtrusive Can break the application Use .NET profiler variables COR_ENABLE_PROFILING COR_PROFILER Slows down the application
  33. 33. Kiev 2017 Only real cases. Only actual trends. DEMO: Profiling Performance
  34. 34. Kiev 2017 Only real cases. Only actual trends. Monitoring Performance
  35. 35. Kiev 2017 Monitoring Performance Performance Counters – PerfMon, PAL Tool Application Insights Dynatrace (for complex environments)
  36. 36. Kiev 2017
  37. 37. Kiev 2017
  38. 38. Kiev 2017 Only real cases. Only actual trends. DEMO: Monitoring Performance
  39. 39. Kiev 2017 Summary Performance Testing is a continuous effort Debug, Profile and Monitor Performance Continuously Improve
  40. 40. Kiev 2017 Only real cases. Only actual trends. Questions? martin@kulov.net

×