Web Application Stress Tool Topics | Next | Previous

Capturing Performance Counters


Select the Perf Counters node from the script tree and click on the Add Counter button. It might take a moment or so to load the Add Counters dialog box when this button is clicked for the first time. Add the following counters:

Change the Collection Interval to every 5 seconds. Capturing the correct performance counters is critical to obtaining the correct data for analysis when the test completes. There are several important performance counters to choose from, based on the type of application you are testing.

The following counters provide a high-level snapshot of a Web application's stability and should provide a good overview of the health of the application. Initially, you should start by capturing a small set of counters. Once you determine the problem area, you can get more details by capturing more counters related to that issue.


note-icon

Note

The overhead incurred from System Monitor is five percent or less on single processor computers and insignificant on multiple processor computers.

Overall Counters

Object Counter Purpose
Processor % Total Processor Time Shows the amount of time spent processing threads by all CPUs. A number consistently above 90% on one or more processors indicates that the test is too intense for the hardware. Make sure you add the 0 through x instances of this counter for multiprocessor computers.
PhysicalDisk % Disk Time Requires diskperf-y at the command prompt. Shows the percentage of elapsed time that the disk is busy with read/write activity. A number consistently above 80% might indicate a memory leak. Make sure you add the 0 through x instances of this counter for multidisk computers.
PhysicalDisk Disk Queue Length Shows the number of outstanding requests on the disk. Sustained queue lengths on one disk that are greater than 3 indicate a disk or memory problem. It might also indicate that a SQL Server is not set up correctly.
Memory Page Faults/sec Shows the number of times a virtual page was not found in memory. If this number is consistently above 0, it indicates that too much memory has been allocated to an application, and not enough to Windows 2000.
Memory Available Bytes Shows the total bytes of real memory that is available to the computer, less the bytes being used by running applications. Add this number to Memory\ Committed Bytes to get the total amount of memory on the computer.
Memory Pool Nonpaged Bytes Shows pages that are used by the operating system that do not leave memory. This will increase with each process, but watch for gradual growth in this counter over a test run. This would indicate an application's repeated inadvertent opening of a file or some other object. Performance will suffer if this gets within 4 megabytes (MB) of Memory\ Available Bytes.
Memory Pages/sec Shows how many pages are being moved to and from the disk to satisfy virtual memory requirements. If the server does not have enough memory to handle its workload, this number will be consistently high.
Memory Committed Bytes Shows the size of virtual memory that has been committed to the running applications. Add this number to Memory\ Available Bytes to compute the total amount of memory on the computer. Committed bytes should increase as the test is ramping up, but it should remain fairly constant after that.
Server Bytes Total/sec Shows network activity. This gives you an idea of how close the server's adapters are to being fully utilized. This is particularly useful for watching multihomed servers.
System Total Interrupts/sec Shows the frequency with which this computer is handling hardware interrupts. This gives you a good idea of how busy the whole system is.
Object Threads Threads are the basic executable entity that can execute instructions in a processor. If this number continues to rise over time, open the Process\ Thread Count counter and see which instance is creating all of the threads.
Process Private Bytes - _Total Shows the current number of bytes all instances have allocated that cannot be shared with other processes. Make sure you select the _Total instance from the list. Select whatever other instances you suspect might be consuming too much memory.

Web Server Only

Object Counter Purpose
Web Service Current Anonymous Users Shows the current number of connections to the service during an unauthenticated stress test. This counter should be just slightly less than the number of Web Application Stress Tool threads times the number of Web Application Stress Tool sockets per thread.
Web Service Current NonAnonymous Users The number of authenticated users currently connected to the HTTP Server. Use this number to determine how many authenticated connections the Web server picks up. If this drops to 0 during an authenticated stress run, check for the correct permission tokens on the content and confirm that the Web Application Stress Tool users have a valid user name and password for each.
Web Service Bytes Total/sec Shows the sum of bytes sent and received by the Web server. If this number is low, it means that IIS is transferring data at a low rate.
Web Service Not Found Errors Shows the number of requests that could not be satisfied by service because the requested document could not be found; typically reported as HTTP 404 error code to client. If this number is greater than 0, the stress is at least partially incorrect.
Active Server Pages Request Errors/Sec The number of errors per second, including connection errors, compile errors, and runtime errors. If this number is ever greater than 0, something is wrong with the test scripts, server configuration, or scripts in ASP pages.
Active Server Pages Requests/sec The number of ASP page requests executed per second. Use this number to provide an indication of how heavy the stress on the Web server is. Anything over 85 connections/sec is heavy stress.
Active Server Pages Requests Rejected The total number of requests not executed because the queue was full or there were insufficient resources to meet the number of hits that the Web server is getting. If this number is consistently above 0, the stress test is too heavy.
Active Server Pages Memory Allocated The total amount of memory currently allocated by Active Server Pages. Compare this number to Memory\ Available Bytes and Memory\ Committed Bytes to determine what percentage ASP is using. A ratio of greater than 50% during the test would indicate a memory leak in a server-side object.
Active Server Pages Requests Queued This should remain close to 0. If it ever reaches 460, you will know that clients are receiving the "Server Too Busy" error. If this queue continues to grow as more stress is applied, the ASP page should be redesigned because it is too complicated for the given stress level.
Process Private Bytes - inetinfo Private Bytes - inetinfo is the current number of bytes the HTTP/ASP service has allocated that cannot be shared with other processes. If this number is consistently large, and growing, there is probably a leak in a server-side object. Compare with Process\ Private Bytes - _Total.

SQL Server Only

Object Counter Purpose
SQLServer Cache Hit Ratio Shows the hit rate that data is found in the cache. If data is not in the cache, the server will have to be read from the disk. This shows memory allocation and therefore indicates whether the server has sufficient memory for the task. A number consistently less than 85% indicates a memory problem.
SQLServer User Connections Shows the number of active SQL Server users. Each connection uses 37 kilobytes (KB) of memory. Compare this number to the Active Server Pages\ Requests/sec counter to get an idea of the degree to which the scripts are really working the SQL Server. A large difference might indicate that the test script is not a valid stress of SQL Server.
SQLServer Net - Network Reads/sec Shows the number of data packets read from the network. An extremely high value for an extended time indicates that either the network card has a problem or, more likely, the application is not using enough stored procedures and is written improperly.
SQLServer I/O - Lazy Writes/sec The number of flushed pages per second by the lazy writer. A number consistently above 0 indicates that the lazy writer is constantly working to flush buffers to disk. This means that the application either has a memory leak or the SQL Server requires more memory for normal operation.
SQLServer - Locks Total Blocking Locks Shows a lock that forces another process to wait until the current process is complete. An occasional block is normal. If this number is consistently greater than 0, it indicates transaction problems. Some of the basic causes are inefficient query design, poor table design, or slow throughput due to inadequate hardware.