What is Load Testing?
The behavior of the application and the utilization of the resources by the application under test is monitored under different load patterns and it is validated against the expected measurements to identify any potential performance errors or bottlenecks.
What is necessity for Monitoring Resources?
Any normal ASP.NET web application will be developed using three tier architecture of Presentation, Business and Data Layers. When a request is made by the client to the server the request is processed by the web server which in turn would be forwarded to the application server and then to the database server. During this processing the System, web server application server and the database server resources are utilized. It is necessary to monitor these resources utilization under load before the application is moved to production in order to identify the performance errors and bottlenecks before it breaks the application and impacts the business of the application.
What Resources need to be monitored?
It is necessary to monitor every logical or physical layer of the web application. In a simple scenario where the application is hosted on a web server and application interacts with the database the sources to be considered for monitoring are System resources, the web server resources and the database resources.It is necessary to identify the specific resources and counters (with their threshold levels) to be monitored at each layer. This identification needs expertise and experience in performance testing. Below is the list of counters that can be used for first level of performance analysis. This table applies for the general ASP.NET applications. However, it needs to be tailored for the specific requirements.
Note: The counters column in the below table to be read as shown in the example: % Processor Time (Processor _Total). Here, the Processor is the Object, % Processor Time is the Counter and _Total is the instance.
How to Monitor the Resources? What tools to use?
On a Windows based machine it is possible to monitor the resources using a utility called perfmon. The same way as perfmon Linux/Unix based machines facilitate the resource monitoring by means of utility known as rstdmon.
Almost every Load Testing tools has integration with Windows Perfmon or has some other has means to provide the facility to monitor the resources. E.g. LoadRunner, Visual Studio 2005 Team Edition for Testers, WebLoad, etc.,
The table of counters provided here provides a possible list of counters that can be monitored for while Load Testing an ASP.NET application. However, it needs to be tailored for specific requirements. For example, while testing a application that uses ADAM process one would be interested to know the processor and memory utilization by the ADAM worker process (dsamain) in specific. It is advised to use the minimum number of high level counters for the first round analysis. Based on the first level analysis one can added more detailed and specific counters for the areas that warrant performance and remove few counters related to areas where the performance seems be good.
-- Lakshminarasimha Mohan
"In god I TRUST, everything else I TEST."