Performance Testing Microsoft® .NET Web Applications

Book description

Find out how to test your Web applications for world-class performance and scalability.

The shift from stand-alone desktop applications to Web-enabled applications that accommodate hundreds of thousands of simultaneous users makes performance testing critical. Find out how to make your Microsoft .NET-based applications perform as well as or better than traditional desktop applications with this book—written by the Microsoft team that tests and tunes hundreds of Web sites and Web-based applications. You'll learn how to take advantage of the best available tools to plan and execute performance tests, configure profile tools, analyze performance data from Microsoft Internet Information Services, Microsoft ASP.NET, managed code, the SQL tier, and more. You'll also learn how to use the testing methodology that Microsoft uses to stress test its own sites—some of the most popular, high-performance Web sites in the world.

Table of contents

  1. Dedication
  2. Acknowledgements
  3. Introduction
    1. Who This Book is For
    2. About the Companion CD-ROM
      1. Using the Companion CD-ROM
        1. Sample Files
        2. ASP Timers
        3. System Monitor Templates
        4. PowerPoint Presentation: Compuware Application Expert
        5. EBook
      2. CD-ROM Requirements
    3. Chapter Overviews
      1. Chapter 1: Laying the Performance Analysis Ground Work
      2. Chapter 2: Preparing and Planning for the Performance Test
      3. Chapter 3: Stress Testing with Microsoft Application Center Test (ACT)
      4. Chapter 4: Monitoring Application Performance with System Monitor
      5. Chapter 5: Application Network Analysis
      6. Chapter 6: Analyzing and Performance Tuning the Web Tier
      7. Chapter 7: Profiling Managed Code
      8. Chapter 8: Analyzing the SQL Tier
      9. Chapter 9: Estimating IIS Tier Capacity with Transaction Cost Analysis
      10. Chapter 10: Performance Modeling: Tools for Predicting Performance
      11. Support
  4. 1. Laying the Performance Analysis Groundwork
    1. Why Is Performance Testing and Tuning Important?
    2. Effects of Current and Emerging Architecture Technologies
    3. What Is .NET?
      1. The .NET Platform
      2. Standard .NET Protocols
      3. Web Service Description Language (WSDL)
      4. Universal Description, Discovery, and Integration (UDDI)
      5. What Is an XML Web Service?
      6. Devices Drive Demand for Web Services
      7. Web Services Will Increase Importance of Web Performance Testing
    4. Performance Goals
      1. Computer Interaction Behavioral Patterns
    5. Performance Testing Your Application
      1. Planning Performance Analysis
      2. Creating Effective Stress Scripts
      3. Executing Stress Tests
      4. Analyzing Performance Results
        1. Identifying Performance Bottlenecks
        2. Verifying Performance Tuning Results
    6. Conclusion
  5. 2. Preparing and Planning for the Performance Test
    1. Identifying Performance Goals
      1. Response Time Acceptability Goals and Targets
      2. Throughput Goals and Concurrent User Targets
      3. Performance Growth Analysis
    2. User Activity Profile
    3. Backend Activity Profile
      1. Identifying a Web Application’s User Activity
      2. Identifying a Web Application’s Backend Performance Bottlenecks
    4. Key Performance Metrics Criteria
    5. Mirroring the Production Environment
    6. Putting It Together in a Performance Test Plan
    7. Conclusion
  6. 3. Stress Testing with Microsoft Application Center Test (ACT)
    1. Getting Started
      1. What is ACT?
      2. Installing Microsoft ACT
    2. Core Concepts of ACT
      1. Dynamic Tests
      2. Concurrent Users and ACT Simultaneous Browser Connections
        1. User Sleep Times
      3. Users and Groups
      4. Cookies
      5. Headers
      6. Authentication and Encryption
        1. Integrated Windows Authentication
        2. Basic and Digest Authentication
        3. Anonymous Authentication
        4. Passport Authentication
      7. Secure Sockets Layer (SSL)
      8. Using SOAP with ACT
      9. Parsing Viewstate within ACT
      10. Protecting your Web Site from Inadvertent Stress Testing
    3. Running ACT
      1. Overview of the ACT User Interface
        1. Tests
        2. Results
        3. Users
      2. Creating a Test Script
        1. Recording a Test Script
        2. Analyzing a Recorded Test Script
        3. Creating a Test Script Manually
        4. Creating a test script to Stress the SQL Tier
        5. Setting Test Properties Prior to Script Playback
        6. Script Modification—Avoiding “Record and Playback”
        7. Debugging ACT Test Scripts
        8. Test Script Verification
        9. Scripts and Load Clients
      3. Executing a Performance/Stress Test
        1. Create a Controlled Environment
    4. Conclusion
  7. 4. Monitoring Application Performance with System Monitor
    1. Using System Monitor
      1. Viewing Real-Time Performance Data
        1. Chart View
        2. Graph View
          1. Counter Color
          2. Counter Scale
          3. Counter Characteristics
          4. Parent Instance Name
          5. Computer Name
          6. Value Bar
        3. Histogram View
        4. Report View
      2. How Often Should You Collect Data?
      3. Logging and Viewing Logged Data
      4. Monitoring Remote Computers
    2. Monitoring Objects, Counters, and Instances for Performance Bottlenecks
      1. Processor Bottlenecks
    3. Typical Processor-related Problems and Solutions
      1. System Object
      2. Disk Bottlenecks
      3. How the ACE Team Discovered a Disk Bottleneck
        1. 10-Second Wait Time Test Scenario on Server 1
        2. 10-Second Wait Time Test Scenario on Server 2
        3. 60-Second Wait Time Test Scenario on Server 1
        4. 60-Second Wait Time Test Scenario on Server 2
      4. Disk Architecture Matters to Performance
      5. Memory
      6. How the ACE Team Discovered a Memory Leak
      7. Create and Configure Alerts
    4. Conclusion
  8. 5. Application Network Analysis
    1. Conducting an Application Network Analysis
      1. Network Latency
      2. Network Round Trips
      3. Reducing Network Round Trips
      4. Data Transferred
      5. Reducing the Quantity of Data Transferred
      6. Processing Delay
      7. Reducing Processing Delays
      8. Response Times
      9. User Scenarios
        1. Identify User Scenarios
    2. Using Microsoft Network Monitor
      1. MAC Address and IP Address Setup
      2. Configuring Network Monitor Settings
      3. Environment Setup
      4. Capturing Network Traffic
        1. Network Monitor Capture Structure
      5. Using Compuware’s Application Expert
        1. Conversation Map
        2. Bounce Diagram
        3. Thread Analysis
        4. Response Time Predictor Tool
      6. Interpreting Network Captures with Application Expert
        1. Calculating Data Transferred
        2. Counting Network Round Trips
        3. Identifying Application Processing Delays
        4. Predicting Response Times
    3. Conclusion
  9. 6. Analyzing and Performance Tuning the Web Tier
    1. Getting Started
    2. Understanding Configuration and Performance
      1. ASP.NET File Extensions
      2. Authentication in ASP.NET
        1. Windows-based Authentication
        2. Passport Authentication
        3. Form-based Authentication
      3. Configuration Files
      4. Understanding Your Web Application
    3. Profiling a .NET Web Application
      1. IIS Log Files
        1. Log File Formats
        2. Identifying Problem Pages from a Log File
      2. Tracing Problems to the Code Level
        1. Tracing in Traditional ASP Pages
        2. Tracing in ASP.NET
        3. Identifying Problem Code in ASPX Pages
      3. System Monitor Counters
        1. Performance Counters for IIS
        2. Performance Counters for ASP.NET
          1. ASP.NET System Performance Counters
          2. ASP.NET Application Performance Counters
    4. Performance Tuning Tips
      1. Application and Session State
        1. Application State
        2. Session State
      2. Caching in ASP.NET
        1. Output Caching
        2. Fragment Caching
        3. Caching API
      3. Disabling ViewState
      4. ADO.NET Tips
        1. SqlConnection Object
        2. SqlCommand Object
          1. ExecuteNonQuery Method
          2. ExecuteScalar Method
          3. ExecuteReader Method
          4. ExecuteXMLReader Method
    5. Common Web Tier Bottlenecks
      1. Limiting Page Size
      2. Limiting Images
      3. Using Naming Conventions
      4. Disabling SSL
      5. Trying New Features
    6. Scaling the Web Tier
      1. Scale Out, Scale Up, or Performance Tune?
        1. Scaling Out
        2. Scaling Up
        3. Performance Tuning
      2. When to Scale your Web Tier?
      3. How to Scale Out your Web Tier?
        1. Software-based Load Balancing
        2. Hardware-based Load Balancing
    7. Conclusion
  10. 7. Performance Analysis of Managed Code
    1. CLR and Performance
      1. Microsoft Intermediate Language
      2. The Just-in-Time Compiler
      3. The Pre-JIT Alternative
    2. The Life and Times of a .NET Web Application
      1. Load Time—AppDomains
      2. Run Time—Interoperability
      3. Run Time—Garbage Collection
        1. Generations and Promotion
        2. Pinned Objects
        3. Finalization
        4. Differences Between Workstation and Server GC
      4. Run Time—Exceptions
        1. Exceptions in Unmanaged Code
        2. Exceptions and Performance
      5. .NET Performance Counters
      6. .NET CLR Memory Object
        1. # GC Handles Performance Counter
        2. # Gen 0 Collections
        3. # Gen 1 Collections
        4. # Gen 2 Collections
        5. # Total Committed Bytes
        6. % Time in GC
        7. Gen 0 heap size
        8. Gen 0 Promoted Bytes/sec
        9. Gen 1 heap size
        10. Gen 1 Promoted Bytes/sec
        11. Gen 2 heap size
      7. .NET CLR Loading
        1. Total AppDomains
        2. Total Assemblies
        3. Total Classes Loaded
      8. .NET CLR LocksAndThreads
        1. Contention Rate/sec
        2. Total # of Contentions
        3. Current Queue Length
      9. .NET CLR Exceptions
        1. # of Exceps Thrown
        2. # of Exceps Thrown /sec
      10. .NET CLR Security
        1. # Link Time Checks
        2. % Time in RT checks
        3. Stack Walk Depth
        4. Total Runtime Checks
    3. Profiling Managed Code
      1. Using Compuware DevPartner Studio
        1. Profiling with DevPartner Studio
        2. Profiling Session Window
        3. Profiling Method Details
        4. Working with Distributed Applications
        5. Effective Performance Analysis for .NET
          1. Understand What You Want to Measure
          2. Understand Start-up Costs
          3. Understand .NET Framework Costs
          4. Collect Complete Data for Distributed Applications
      2. Using AppMetrics to Monitor .NET Enterprise Services Components
        1. AppMetrics Manager and Agent Monitors
        2. Setting Up AppMetrics Manager and Agent
      3. Pre-Production Monitoring in AppMetrics
        1. Additional Diagnostics Information
      4. Production Monitoring
    4. Conclusion
  11. 8. Analyzing the SQL Tier
    1. Getting Started
    2. Identifying Bottlenecks
      1. Tools We Use
        1. SQL Profiler
        2. System Monitor
        3. SQL Query Analyzer
      2. Blocking Problems
        1. Identifying Blocking Connections
        2. Locks
        3. Deadlocks
        4. Additional Resources
    3. Index Tuning
      1. Analyzing the Execution Plan
        1. Populating Data
        2. Viewing the Execution Plan
        3. Additional Tuning Information
      2. Understanding Indexes
      3. Choosing Right Indexes
        1. Nonclustered Index
          1. Covering Index Example 1
          2. Covering Index Example 2
        2. Clustered Index
          1. FILLFACTOR
          2. Indexed View
    4. Conclusion
  12. 9. Estimating IIS Tier Capacity with Transaction Cost Analysis
    1. Concurrent Users: A Loosely Defined Term
      1. Concurrent Server Request Processing
      2. TCA Concurrent Users
    2. Benefits of Completing a TCA
    3. TCA In Five Steps
      1. Step 1—Create A User Profile
      2. Step 2—Stress Test for User Operation Costs
        1. TCA Stress Test Goals and Parameters
        2. Identifying Maximum Throughput
        3. Minimizing the Number of Pages Needed per Operation
      3. Step 3—Calculate the Cost per User Operation
        1. Cost Per User Operation/Sec Calculation
        2. Interpreting the Cost per User Operation Numbers
        3. Performing TCA “What If” Scenarios
      4. Step 4—Estimate Site Capacity
        1. Mean User Profile Capacity Estimates
        2. Increased Add to Basket Traffic “What If” Scenario Capacity Estimates
      5. Step 5—Verify Site Capacity
    4. Conclusion
  13. 10. Performance Modeling: Tools for Predicting Performance
    1. Predicting and Evaluating Performance Through TCA
    2. Advanced Performance Modeling
    3. Performance Modeling Technology
      1. Modeling Scenarios
        1. Capacity Planning
        2. Bottleneck Analysis
        3. Hardware Configuration
        4. Architectural Assessment
        5. User Scenarios
      2. Performance Modeling Methods
        1. Analytical Modeling
        2. Statistical Modeling
        3. Simulation
        4. Advanced Performance Modeling
      3. Performance Modeling Tools
    4. Indy: A Performance Technology Infrastructure
      1. Indy Concepts
      2. Indy Architecture
        1. Kernel
        2. Hardware DLLs
        3. Workload DLLs
        4. Interface Definitions
        5. Front-end EXEs
      3. IndyView
        1. System Topology
        2. IBuySpy Search Transaction
      4. TCA vs. Performance Modeling Conclusions
      5. Building What-if Scenarios Using Indy
        1. What-if Scenario 1: Bottleneck Analysis
        2. What-if Scenario 2: Architectural Improvements
    5. Conclusion
  14. A. About the Author
  15. About the Author
  16. Copyright

Product information

  • Title: Performance Testing Microsoft® .NET Web Applications
  • Author(s): MICROSOFT ACE TEAM
  • Release date: October 2002
  • Publisher(s): Microsoft Press
  • ISBN: 9780735615380