While working on many applications’ performance and load test projects, we have been testing quite a few web and desktop applications developed using .Net, Java, PHP etc. using different frameworks, models, technologies and libraries. One of the basic requirements on all these projects is to involve the stakeholders, who are either working directly or supporting other activities for the application development like architecture, leads, system admins and DBAs etc. Thus, the first challenge for performance test architecture would be of defining the roles and help areas for each of the stakeholders. We need to plan it in an efficient way so that it is not an expensive engagement and does not consume valuable time of various stakeholders. To achieve this, the performance architects should first prepare the list of required tools and define techniques for the stakeholders so that we can minimize their involvement and still get the best results with their help.
In this blog, we’ll talk about different tools and techniques based on the SUT hosting or setup environment. Like for Java, the set of the performance monitoring tools and techniques would be different than ASP.Net or PHP. In the same way, the set of tools may be different based on server architecture and environment. Also, we could get different requirements from different stakeholders for monitoring.
Based on all this, we suggest different tools, counters and techniques to the different groups within a project. I’ll share some details for ASP.Net technologies one by one through this series of blogs. First, let’s talk about the most common performance counters which would be helpful for monitoring and debugging of ASP.Net applications.
I am assuming that you are aware of performance counters, if not, you can get yourself acquainted with performance counters here. As such, the monitoring of counters depends on the information that is required for resolving issues or optimizing the application. Based on the requirements, one can monitor the different performance counters into perfmon – a .net performance monitoring utility. Now that you are ready to starting the monitoring of counters — the important question is – which counters are you going to monitor? Following is the list of most common performance counters:
The following list provides definitions of most common performance counters. The term in bracket specifies the category of counter:
- Application Restart (Asp.Net System) – The number of times that an application has been restarted. This counter increments with each Application_end event but is reset if IIS is restarted.
- Request Queued (ASP.Net System) — The number of requests waiting for service.
- Worker Process Restarts (ASP.NET System) — The number of times a worker process has been restarted on the server.
- Errors Total (Asp.Net Applications) — The total number of errors that occurred during the execution of HTTP requests.
- Errors Total / Sec (Asp.Net Applications) — The number of errors per second.
- Pipeline Instance Count (Asp.Net Applications) — The number of active pipeline instances.
- Requests/Sec. (ASP.NET Applications) — The number of requests executed per second.
- % CPU Utilization (Processor) — Current CPU utilization — the CPU should be utilized fully.
- # of Exceptions Thrown (.Net CLR Exceptions) — The total number of exceptions thrown.
- Context Switches/Sec (System) — A context switch occurs when the kernel switches the processor from one thread to another, for example, when a thread with a higher priority than the running thread becomes ready. Context switching activity is important for several reasons. A program that monopolizes the processor lowers the rate of context switches because it does not allow much processor time for the other processes threads. A high rate of context switching means that the processor is being shared repeatedly, for example, by many threads of equal priority. A high context-switch rate often indicates that there are too many threads competing for the processors on the system.
The above list is just an introduction to basic performance counters. You might need to monitor additional performance counters as per the nature of applications and as per the requirements of different project teams. Now I will try to describe about some common tools which will be useful for ASP.Net application debugging and monitoring.