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.

Four Practices to Fix Your Top .NET Performance Problems

Inefficient Database Access, Inefficien Pool usage and Sizing, Bad Synchronization, Bad Web Page Design - these are the problems that crash .NET Apps. Learn how to analyze them and fix these problems

  • Be the first to comment

Four Practices to Fix Your Top .NET Performance Problems

  1. 1. @Dynatrace - Get Dynatrace: - More YouTube Tutorials: Hosted by: Andreas Grabner (@grabnerandi & Ask questions using the Questions Tab – or post on Four Practices for Fixing Your Top .NET Performance Problems
  2. 2. @Dynatrace • Top Problems I’ve seen in the years thanks to • How to • Instrument ASP.NET, IIS and Common Mistakes • Process Performance Analysis: • CPU, Memory & Thread Hotspots • Monitoring through Windows Performance Counters • Application Performance Analysis • Error, Exception and Log Analysis • Database Hotspots: SQL + Bind Values, Connection Pool Information • Method Hotspots, Synchronous vs Asynchronous Executions • Monitoring Thread Pools and Other Queues using JMX • Live Q&A Agenda for Today
  4. 4. Browser Issue? Bandwidth Issue? OS Issue? Geo Issue?Why Frustrated?
  5. 5. Beautiful but Heavy Pages
  6. 6. 32! JavaScript files 5MB! In Size W3C Resource Timings!
  7. 7. #1: # of Resources #2: Total Page Size #3: Involved Domains
  8. 8. 10 @Dynatrace
  9. 9. Too Many Queries crash Undersized Pools
  10. 10. Online Banking: Slow Balance Check 1.69m (=101s!) To Check Balance! 87% spent in IIS 600! SQL Executions
  11. 11. #1 Time really spent in IIS? Tip: Elapsed Time tells us WHEN a Method was executed! Finding: Thread 32 in IIS waited 87s to pass control to Thread 30 in ASP.NET Tip: Thread# gives us insight on Thread Queues / Switches
  12. 12. #2 What about these SQL Executions? Finding: EVERY SQL statement is executed on ITS OWN Connection! Tip: Look at “GetConnection”
  13. 13. #2 SQL Executions! continued … #1: Same SQL is executed 67! times #2: NO PREPARATION because everything executed on new Connection
  14. 14. Lessons Learned! ASP.NET Worker Thread Pool Sizing! DB Connection Pools More Efficient SQL
  15. 15. #1: Idle vs. Busy Threads #2: # SQLs / Request #3: # GetConnection
  16. 16. Bad Synchronization
  17. 17. Load vs. Memory vs Response Time vs. Threads Increasing Memory Avg Response Time: Increases over Time Max Response Time correlates with # Threads Max Response Time correlates with # Threads Load: System can’t handle constant load over time # of Worker Threads increase with constant load Layer Breakdown: Performance Problem is in their own code (Sync Time)
  18. 18. 96% Synchronization Time Monitor.Enter: By far biggest performance contributor Called from GetStatus and _GetDebugStatus. Why also from Debug method? Bug?
  19. 19. Excessive File Attribute Access second hotspot Can FileExist check be cached to reduce File Access? File Access next hotspots
  20. 20. #1: # of Threads vs # Incoming Requests #2: Time Spent in Sync #3: Time Spent in I/O
  21. 21. @Dynatrace • Get Dynatrace Personal License: • Download and Install from: • Watch the YouTube Tutorials: • 2 Steps for Instrumenting .NET and IIS Agent • .NET Agent Configuration Tool to configure ASP.NET AppPool • Load Dynatrace IIS Web Server Agent Module • GO! Launch Your App! Analyze Results! Instrumenting ASP.NET & IIS
  22. 22. @Dynatrace • IIS not restarted after Agent Installation • IIS only loads AppPool when you access website • Loading 64bit instead of 32Bit Agent IIS Module • Firewall or DNS issues to YOURDTCOLLECTOR:9998 • Wrong TIERNAME leading to „Agent didnt match System Profile“ Most Common Mistakes
  23. 23. @Dynatrace Demo Instrumenting an ASP.NET Application
  24. 24. @Dynatrace Demo Analyze Application Performance
  25. 25. @Dynatrace • Meetups and User Groups: We are happy to present! • Feb 2016: SAP hybris Summit, Chef Seattle, Docker Meetup San Mateo, DT User Group in Pittsburgh and Cleveland … • Mar 2016: Zurich (Testing Day + Java Meetup), DevConf South Africa, DT User Groups in Detroit, Columbus and New York City • April 2016: STPCon, DT User Group in San Mateo • YouTube Channel: • Dynatrace Personal: • Contact: • Share Your PurePath: Reminders
  26. 26. Participate in our Forum :: Like us on Facebook Follow us on LinkedIn Connect with us! Follow us on Twitter Watch our Videos & Demos Read our Blog