ASPNET Performance

Document Sample
ASPNET Performance Powered By Docstoc
					ASP.NET Performance:
  A Case Study




Charles Nurse, MVP
DotNetNuke Corporation   Session: DSA301
Agenda
 Performance Plan
 Performance Tools
 Asp.NET Performance Bottlenecks
 Performance Results
 Questions
Performance Plan
 Risk Management
 Quality of Service
   Performance
   Scalability
   Manageability
   Upgradability
   Security
 ProActive vs Reactive
Terms and Concepts
 Performance
 Scalability
 Latency
 Performance Objectives
   Response time
   Throughput
   Resource Utilization
   Workload
 Metrics
 Performance Budgets
 Scenarios
Identifying Scenarios
 DotNetNuke
 High Throughput Enterprise Portals
   www.dotnetnuke.com
   www.nrl.com
   www.afl.com.au
 High-Density Dedicated Servers
 High-Density ASP.NET Servers
   Windows Hosting
Identifying Performance
Objectives
 www.dotnetnuke.com
   6M pages/month
   Evenly distributed
   ~900 - 1000/hr
   1 Web Server
   1 SQL Server
 www.nrl.com
   17M pages/month
   Peaks on Game Day
   ~30,000/hr at peak
   8 Web Server Farm
   2 File Servers
   2 SQL Servers
Identifying Performance
Objectives
 Response Time
   2-10 secs
   First Byte (0-2 secs)
   Last Byte (5-10 secs)
 Throughput
   20,000 pages per hr
 Resource Utilization
   RAM
   Hard Drive
    Network Configuration
Agenda
 Performance Plan
 Performance Tools
 Asp.NET Performance Bottlenecks
 Performance Results
 Questions
Performance Tools
 Profilers
   Database Profilers
     SQL Profiler
   .NET Profilers
     ANTS Profiler
     CLR Profiler
   Performance Monitor
     Performance Counters
     Instrument your App
Performance Tools
 Web Test
   Visual Studio Team Suite
 Load Test
   Visual Studio Team Suite
   ANTS Load
Performance Tools
 Demos
   SQL Profiler
     Monitoring Database calls
   ANTS Profiler
     Identify frequently called code
     Identify poorly performing code
Agenda
 Performance Plan
 Performance Tools
 Asp.NET Performance Bottlenecks
 Performance Results
 Questions
ASP.NET Performance
Bottlenecks
 Assembly Loading
   Public /bin vs Private locations
 DotNetNuke
    4.3.6
      93 Assemblies
      6.0 MB
   4.4.0
      63 Assemblies
      4.7 MB
   4.6.0
      32 Assemblies
      3.4 MB
Assembly Loading
  <runtime>
    <assemblyBinding>
     <probing
 privatePath="bin;bin\HttpModules;bin\Provider
 s;bin\Modules;bin\Support;" />
    </assemblyBinding>
  </runtime>
Database Calls
 Cache objects that are frequently used
   Portal settings
   Pages (per portal)
   Page Permissions (per portal)
   Modules (per page)
   Module Permissions (per page)
   Folder Permissions (per portal)
 Cache Limitations
   Scavenged as Physical RAM available decreases
ASP.NET Performace
Bootlenecks
 Static Content
   Cache content that rarely changes
     Memory Caching
     File System Caching
 Reflection
   Reflection is slow
     CBO vs Custom Hydration - demo
   Minimise use
ASP.NET Performace
Bootlenecks
 XML
   XML is verbose
   XML DOM is expensive
 XmlDocument vs XPathDocument
   XPathDocument – readonly, faster
   XmlDocument – read/write, full DOM, slower
 XMLSerializer vs XMLReader/XMLWriter
   demo
Agenda
 Performance Plan
 Performance Tools
 Asp.NET Performance Bottlenecks
 Performance Results
 Questions
Performance Results
 Load Test (using Visual Studio 2005 Team
 Suite)
    VSTS Developer Machine
    VSTS Controller
    3 VSTS Clients
    Web Server
    SQL Server
 50 Applications
 5 Application Pools
Performance Results
  DotNetNuke 4.3.6

  Total Requests 37155
  Requests/Sec 20.6

  Private Bytes
         Tests Apps w3wp - 0 w3wp - 1 w3wp - 2 w3wp - 3 Average               w3wp - 4
    4:15 20        4      92.90    85.40    84.90    79.60    85.70 21.43        82.20 20.55
    9:20 70       14     141.70   137.60   138.50   132.90   137.68 9.83        149.20 10.66
   12:55 105      21     177.70   181.20   172.70   173.00   176.15 8.39        185.70 8.84
   16:35 140      28     208.10   215.00   210.30   207.30   210.18 7.51        245.10 8.75

  Working Set
         Tests Apps w3wp - 0 w3wp - 1 w3wp - 2 w3wp - 3 Average               w3wp - 4
    4:15 20        4     137.00   128.90   127.70   120.30   128.48   32.12     125.80   31.45
    9:20 70       14     226.30   218.30   219.40   211.50   218.88   15.63     246.00   17.57
   12:55 105      21     289.90   293.00   281.00   280.70   286.15   13.63     317.00   15.10
   16:35 140      28     342.00   352.70   345.50   340.90   345.28   12.33     416.80   14.89
Performance Results
 DotNetNuke 4.4.0 Beta

 Total Requests 52836     30%
 Requests/Sec 29.4        30%


 Private Bytes
        Tests   Apps w3wp - 0 w3wp - 1 w3wp - 2 w3wp - 3 Average               w3wp - 4
   4:15 25        5      88.10    84.50    81.90    81.10    83.90 16.78 22%      77.90 15.58 24%
   7:15 70       14     128.50   127.00   121.30   120.30   124.28 8.88 10%      118.10 8.44 21%
   9:55 110      22     164.70   160.80   156.60   157.60   159.93 7.27 13%      154.50 7.02 21%
  15:55 195      39     223.50   221.60   221.10   220.80   221.75 5.69 24%      230.30 5.91 33%

 Working Set
        Tests   Apps w3wp - 0 w3wp - 1 w3wp - 2 w3wp - 3 Average               w3wp - 4
   4:15 25        5     132.70   125.80   122.00   121.80   125.58 25.12 22%     120.10   24.02 24%
   7:15 70       14     202.60   200.70   191.60   189.20   196.03 14.00 10%     192.10   13.72 22%
   9:55 110      22     264.80   260.10   253.30   253.60   257.95 11.73 14%     259.30   11.79 22%
  15:55 195      39     376.50   374.80   374.00   372.20   374.38 9.60 22%      407.00   10.44 30%
Performance Results


   Summary

                         4.3.6    4.4.0    Delta   %
   Home Page ‐AppStart    12.01    10.14    1.88   15.6%
   Home Page               3.54     2.21    1.33   37.6%
   Project Owner           2.51     1.21    1.31   51.9%
   Core Team               3.77     2.23    1.54   40.8%
   Roadmap                 3.49     1.97    1.52   43.6%
Agenda
 Performance Plan
 Performance Tools
 Asp.NET Performance Bottlenecks
 Performance Results
 Questions
Acknowledgements
  DotNetNuke Corporation
• Shaun Walker, CEO

  Microsoft Patterns and Practices
  Group
• Eugenio Pace
• Carlos Farre
Questions

				
DOCUMENT INFO
Shared By:
Stats:
views:30
posted:3/20/2011
language:English
pages:25