1 / 34

Troubleshooting Web Site Performance Issues with Visual Studio Team System

Troubleshooting Web Site Performance Issues with Visual Studio Team System. Martin Kulov Director .NET Development National Academy for Software Development MVP – VSTS, MCT, MCSD, MCPD. What We Will Cover. How testing processes can help us deliver quality code

latoya
Télécharger la présentation

Troubleshooting Web Site Performance Issues with Visual Studio Team System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Troubleshooting Web Site Performance Issues with Visual Studio Team System Martin Kulov Director .NET Development National Academy for Software Development MVP – VSTS, MCT, MCSD, MCPD

  2. What We Will Cover • How testing processes can help us deliver quality code • Measuring performance of ASP.NET sites • Improving ASP.NET performance

  3. Session Prerequisites • .NET Framework intermediate level • ASP.NET intermediate level • Windows Counters basic level Level 200

  4. Agenda • WWW (Why, When, What) to test • Web Applications Tests • Performance Testing ASP.NET applications • Profiling ASP.NET Applications • Measuring ASP.NET Applications • Tuning ASP.NET Applications

  5. Why we should test • Quality increase • Finding and fixing design problems • Lowering TCO and maintenance costs

  6. When we should test • As often as possible • As early as possible • Test automation would help a lot

  7. What we should test • Critical business features • Everything else  • The clearer performance goals are, the better we will know what to test • PMs should get these goals defined from the start

  8. Testing Web ApplicationsTesting types • Functional Testing • Performance Testing • Security Testing • Reliability Testing • Usability Testing • others …

  9. Performance Testing • Most critical and often neglected type of test • It should be done during each phase of the project • There are three main principles • Measure • Measure • Measure • Set your desired goals • Tune the application

  10. Setting your goals • Response time • Latency on the server • Latency on the client (TTFB and TTLB) • Throughput • Resource utilization • Identify problem areas • Define workload profiles

  11. Profiling ASP.NET Applications • Profiling is the process of collecting data • We can measure the result • Profiling is done though code instrumentation • In instrumentation we inject additional code to the system so it can generate events

  12. System Resources CountersCPU Counters • Processor\% Processor Time • Processor\% Privileged Time • Processor\% Interrupt Time • System\Processor Queue Length • System\Context Switches/sec

  13. System Resources CountersMemory Counters • Memory\Available Mbytes • Memory\Page Reads/sec • Memory\Pages/sec • Memory\Pool Nonpaged Bytes • Server\Pool Nonpaged Failures • Server\Pool Paged Failures • Server\Pool Nonpaged Peak • Memory\Cache Bytes • Memory\Cache Faults/sec

  14. System Resources CountersNetwork Counters • Network Interface\Bytes Total/sec • Network Interface\Bytes Received/sec • Network Interface\Bytes Sent/sec • Server\Bytes Total/sec • [Protocol_Object]\Segments Received/sec • [Protocol_Object]\Segments Sent/sec • Processor\% Interrupt Time

  15. System Resources CountersDisk I/O Counters • PhysicalDisk\Avg. Disk Queue Length • PhysicalDisk\Avg. Disk Read Queue Length • PhysicalDisk\Avg. Disk Write Queue Length • PhysicalDisk\Avg. Disk sec/Read • PhysicalDisk\Avg. Disk sec/Transfer • PhysicalDisk\Disk Writes/sec

  16. Managed Code CountersMemory Counters • Process\Private Bytes • .NET CLR Memory\% Time in GC • .NET CLR Memory\# Bytes in all Heaps • .NET CLR Memory\# Gen N Collections • .NET CLR Memory\# of Pinned Objects • .NET CLR Memory\Large Object Heap Size

  17. Managed Code CountersOther Counters • Working Set • Process\Working Set • Exceptions • .NET CLR Exceptions\# of Exceps Thrown / sec • Contention • .NET CLR LocksAndThreads\Contention Rate/sec • .NET CLR LocksAndThreads\Current Queue Length

  18. Managed Code CountersOther Counters • Threading • .NET CLR LocksAndThreads\# of current physical Threads • Thread\% Processor Time • Thread\Context Switches/sec • Thread\Thread State • Code Access Security • .NET CLR Security\Total RunTime Checks • .NET CLR Security\Stack Walk Depth

  19. ASP.NET Counters • Worker Process • ASP.NET\Worker Process Restarts • Throughput • ASP.NET Applications\Requests/Sec • Web Service\ISAPI Extension Requests/sec • ASP.NET\Requests Current • ASP.NET Applications\Requests Executing • ASP.NET Applications\Requests Timed Out • Response time / latency • ASP.NET\ Request Execution Time

  20. ASP.NET Counters • Cache • ASP.NET Applications\Cache Total Entries • ASP.NET Applications\Cache Total Hit Ratio • ASP.NET Applications\Cache Total Turnover Rate • ASP.NET Applications\Cache API Hit Ratio • ASP.NET Applications\Cache API Turnover Rate • ASP.NET Applications\Output Cache Entries • ASP.NET Applications\Output Cache Hit Ratio • ASP.NET Applications\Output Cache Turnover Rate

  21. Tuning ASP.NET ApplicationsTuning Process • Performance tuning is an iterative process • On every step we should identify and eliminate bottlenecks • Retest and measure again to see if we are closer to our performance goals

  22. Tuning ASP.NET ApplicationsTuning Categories • Application • Configuration settings • web.config • Platform • .NET Framework • Web Server • OS • Database • System • CPU, Memory, I/O, etc…

  23. Tuning ASP.NET ApplicationsTune the thread pool • <processModel> <processModel enable="true" timeout="Infinite“ idleTimeout="Infinite“ shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000" restartQueueLimit="10“ memoryLimit="60“ webGarden="false" cpuMask="0xffffffff" userName="machine“ password="AutoGenerate" logLevel="Errors“ clientConnectedCheck="0:00:05“ comAuthenticationLevel="Connect“ comImpersonationLevel="Impersonate“ responseDeadlockInterval="00:03:00" maxWorkerThreads="20“ maxIoThreads="20"/>

  24. Tuning ASP.NET ApplicationsTune the thread pool • <httpRuntime> <httpRuntime executionTimeout="90" maxRequestLength="4096“ useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true"/>

  25. Tuning ASP.NET ApplicationsRecommended settings • Recommended Threading Settings for Reducing Contention

  26. Tuning ASP.NET ApplicationsOther settings • Set memory limit • <processModel ... memoryLimit="60" .../> • IIS 6.0 manager • Set timeouts • <httpRuntime executionTimeout="90" /> • <processModel responseDeadlockInterval="00:03:00" /> • Evaluate use of RequestQueueLimit • <processModel enable="true" requestQueueLimit="5000" />

  27. Tuning ASP.NET ApplicationsOther settings • Disable tracing and debugging • Disable session state • <sessionState mode="off" /> • <sessionState timeout="20"/> • Disable View State • <pages enabledViewState="false" /> <configuration> <system.web> <trace enabled="false" pageOutput="false" /> <compilation debug="false" /> </system.web> </configuration>

  28. Demonstration 1 Profiling and load testing ASP.NET applications with Visual Studio Team System 2005 for Software Testers

  29. Session Summary • The inevitable software testing process • Measuring performance of ASP.NET applications • Tuning performance of ASP.NET applications • Visual Studio Team System 2005 for Software Testing provide integrated profiling, load testing and reporting environment

  30. Next Steps • Create load profiles for your application • Prepare and analyze reports from load testing • Identify and resolve bottlenecks • Tune Windows OS performance • Tune ADO.NET performance • Tune SQL Server performance

  31. For More Information • Microsoft patterns & practices • http://msdn.microsoft.com/practices/ • Improving .NET Application Performance and Scalability • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenet.asp

  32. Additional Resources • Rico Mariani’sblog • http://blogs.msdn.com/ricom/ • Maoni'sWebLog • http://blogs.msdn.com/maoni/ • Bulgarian Association of Software Developers • http://www.devbg.org • http://academy.devbg.org • Martin Kulov’s blog • http://www.codeattest.com/blogs/martin

  33. Questions and Answers • Submit text questions using the “Ask” button. • Don’t forget to fill out the survey. • For upcoming and previously live webcasts: www.microsoft.com/webcasts • Got webcast content ideas? Contact us at: http://go.microsoft.com/fwlink/?LinkId=41781 • Today's webcast was presented using Microsoft Office Live Meeting. Get a free 14- day trial by visiting: http://www.microsoft.com/presentlive

More Related