Print View

Load testing IIS using Log Parser and WCAT

Issue

There are a number of articles available that show how to use existing production IIS server logs to recreate a workload similar to that seen in production.

Unfortunately these articles are either incorrect, incomplete, have syntax errors, are specific to non-current versions of the products, or do not deal with Windows Authentication. The following process has been used to replicate production workloads successfully.

The following example uses Log Parser 2.2 and Web Capacity Analysis Tool (WCAT) 6.3.

Resolution

1) Install Log Parser 2.2

http://theether.net/download/Microsoft/IIS/LogParser.msi

Copy templates and SQL commands to the %ProgramFiles%\Log Parser 2.2 folder:

http://theether.net/download/Microsoft/IIS/wcat.sql
http://theether.net/download/Microsoft/IIS/wcat.tpl
http://theether.net/download/Microsoft/IIS/wcat.NTLM.tpl

Copy IIS log files to analyse to the %ProgramFiles%\Log Parser 2.2 folder.

2) Generate WCAT Scenarios
2a) Using Anonymous Authentication on IIS

From a command prompt:

CD "\Program Files\Log Parser 2.2"
Logparser file:WCat.sql?logfile=*.log+outfile=CurrentLog.ubr -i:IISW3C -o:tpl -tpl:WCat.tpl

(missing -i:IISW3C parameter courtesy Scott Stafford)

2b) Using Windows Authentication on IIS

Edit wcat.NTLM.tpl and update DOMAIN, user and password.

From a command prompt:

CD "\Program Files\Log Parser 2.2"
Logparser file:WCat.sql?logfile=*.log+outfile=CurrentLog.ubr -i:IISW3C -o:tpl -tpl:WCat.NTLM.tpl


3) Install WCAT on Test Clients
WCAT has the architecture of a controller and many clients.

Install WCAT on the controller:

http://theether.net/download/Microsoft/IIS/wcat.x86.msi
http://theether.net/download/Microsoft/IIS/wcat.amd64.msi

Copy the "%ProgramFiles%\Log Parser 2.2\CurrentLog.ubr" scenario file to the %ProgramFiles%\wcat folder.

Install WCAT on the clients:

From a command prompt:

CD "\Program Files\wcat"
cscript wcat.wsf -update -clients localhost Test1


Note: This will install the WCAT client (wcclient.exe) on the controller and the Test1 host. This will reboot all clients immediately.

4) Start the WCAT Controller

From a command prompt:

CD "\Program Files\wcat"
start wcctl.exe -t currentlog.ubr -s webserver.domain.com -c 2 -v 500


Note: The -c parameter specifies the number of clients to wait for.

5) Start the Clients

From a command prompt on the Controller:

CD "\Program Files\wcat"
start wcclient.exe localhost


From a command prompt on each client:

CD "%windir%\wcat"
start wcclient.exe controller.domain.com


6) Review Test Results

Run the following command on the Controller:

iexplore %ProgramFiles%\wcat\log.xml

References

Products

Microsoft Internet Information Services 7.0
Microsoft Internet Information Services 6.0
Microsoft Internet Information Services 5.0

Created: 16th July 2009
Updated: 7th January 2010

Print View

© 2005-2024 Jamie Morrison