Stress Test ASP.NET Web Application With Free WCAT Tool

 

Building ASP.NET web applications? Plan to serve thousands of users? Would you like to see how your application would behave [misbehave] under stress?

Use simple-to-use and freely available WCAT tool to generate the load and get detailed report for expected throughput (requests/sec) and other important performance-wise information.

Summary of steps

  • Install WCAT
  • Create configuration files
  • Run the test
  • Examine results

Next section describes each step in details. Note, this post is a how-to, a jump start - not the guidelines or best practices of how to use the tool.

Install WCAT

Download and install Internet Information Services (IIS) 6.0 Resource Kit Tools. For the purpose of our exercise there is no need to install all the tools included with the resources kit, only WCAT.

Create configuration files

There are three textual files one needs to create and configure (you can give any name and extension of your choice):

  • script.txt - this file defines the requests, in other words what pages to request and how to request it. Following is an example of simple script.txt file:

NEW TRANSACTION
    classId = 1
    NEW REQUEST HTTP
        Verb = "GET"
        URL = "https://localhost/BankingShmanking/Default.aspx"

  • distribution.txt - defines weights among different requests. For example, if I need to generate request to page1.aspx twice as to page2.aspx, I will define it in this file. In case of loading only one page, the file is meaningless. Following is an example of simple distribution.txt file (1 refers to classId in script.txt file, and 50 is that 50% of the load should got this file which is meaningless since there is only one page to request, thus it will get the whole 100% load):

1 50

  • config.txt - determines the duration of the test, number of clients that will generate the requests against the web application. Following is the example of simple config.txt file:

Warmuptime 5s
Duration 30s
CooldownTime 5s
NumClientMachines 1
NumClientThreads 20

Save the files in "C:\Program Files\IIS Resources\WCAT Controller" folder.

Run the test

To run the stress test open command prompt by opening Run window(Windows + R) type cmd and hit Enter. Change current directory to "C:\Program Files\IIS Resources\WCAT Controller>" and run the following command to test the page hosted on the localhost:

wcctl -c config.txt -d distribution.txt -s script.txt -a localhost

then open second command prompt, change current folder to "C:\Program Files\IIS Resources\WCAT Client" and run the following command to actually launch the virtual client's requests from local machine:

wcclient.exe localhost

Examine results

The results are displayed interactively in the command line windows

 

image

The tool also generates log file that includes logged metrics - look for it in "C:\Program Files\IIS Resources\WCAT Controller" folder.

WCAT tool is actively developed by IIS team and recently they released new version of the tool - WCAT 6.3, download it from here, free.

Comments

  • Anonymous
    March 11, 2008
    How to anticipate or better off avoid performance related "surprises" during load and stress
  • Anonymous
    March 11, 2008
    How to anticipate or better off avoid performance related "surprises" during load and stress
  • Anonymous
    April 07, 2008
    [Ed. - Guy, apologies for originally calling you Eran.. shy] PDD - Performance Driven Development presentation
  • Anonymous
    April 20, 2008
    These free performance tools will save you time and money identifying performance bottlenecks. Your customers
  • Anonymous
    April 21, 2008
    The comment has been removed
  • Anonymous
    April 28, 2008
    Chatty database access is the surefire way for slow performance caused by  resources starvation
  • Anonymous
    July 20, 2008
    Have you noticed that when ASP.NET web application is accessed for the first time the response is slow?
  • Anonymous
    July 31, 2008
         To achieve best performance you need to make decisions based on trade-off between
  • Anonymous
    July 31, 2008
        In my previous post -  Best ASP.NET Performance Winner For Data Binding - Hands
  • Anonymous
    July 31, 2008
    In my previous post - Best ASP.NET Performance Winner For Data Binding - Hands Up To Response.Write()
  • Anonymous
    November 01, 2008
    Field experience proves - the earlier performance is tackled in development lifecycle the better results
  • Anonymous
    February 22, 2009
    No witty opening comment this week...sorry to disappoint. :) General Improve .Net Performance Effectively & Efficiently : Microsoft's ACE team, who are are responsible for application performance, security, and privacy, has a great post about improving