Optimize an ASP.NET application. The goal of applying optimizations is typically to achieve maximum throughput and/or to lower response time. Optimizing a complex system consisting of a number of hardware and software components can be difficult, but by applying a systematic approach, optimizations can be discovered and applied effectively.
The optimization process begins by collecting data on the system and analyzing the data. A performance issue is identified, and alternatives are proposed and explored. Next, a solution is applied to the system, and data is collected again to analyze the performance difference. The change is then accepted or rejected, and the performance analysis cycle begins again.
Use a top-down methodology, performing system-level optimizations, followed by application-level optimizations. While microarchitectural optimizations generally follow application-level optimizations, the gains from microarchitectural optimizations in the context of ASP.NET applications are typically small.
The top-down methodology means that tuning begins with higher-impact changes such as I/O and database configuration at the system level. Only after the bottlenecks have been removed from the higher level of optimization can the next level of optimization take place. This means that system-level optimizations have to come before application-level optimizations, which have to come before micro-architecture-level optimizations.
Furthermore, after applying a change at a lower level, you must go back again to the top level and begin the optimization again. For instance, an application-level change could help performance, but it could also expose a system-level bottleneck that must be alleviated. Generally, when optimizing a complex system, a majority of the time is often spent identifying system-level issues.
Each class of tuning requires a different set of tools and performance tests. For instance, system monitoring tools such as Microsoft Perfmon* are excellent at finding system-level issues, but they will not find microarchitectural-level issues. The Intel® VTune™ Performance Analyzer is an excellent performance analysis tool, providing Call Graph, Counter Monitor, and other valuable data. It is also flexible enough to be applied in system-level, application-level, or microarchitecture-level tuning, but it may not provide the necessary specific data. For instance, if you know you have a network issue, The Microsoft Netmon* tool can be used specifically for that purpose.
System-level and application-level tuning for ASP.NET applications are covered in the following separate items:
- How to Apply System-Level Tuning on the ASP.NET* Platform
- How to Apply Application-Level Tuning on the ASP.NET* Platform