Tuesday, July 20, 2010

Load testing SharePoint pages using JMeter

Recently I found myself in search of an open source web load testing tool to do testing and to measure my SharePoint application's home page performance. Apache Jmeter a feature rich tool to prepare a load test which helped to arrive at the statistics.
JMeter Java desktop application which comes in an executable jar file and can be downloaded from here. Obviously you need java runtime(JRE) to start this jar file.
open the bin folder and open ApacheJMeter.jar file from windows explorer
Right click the Test Plan and add a Thread group

Provide the applicable values

Thread group configuration
  • Name - Give a name to store all settings in a jmx file.
  • Number of Threads - Number of concurrent users to hit the page
  • Ramp-Up Period - Thread acceleration period If the number of threads used is 10 and the ramp-up period is 20 seconds,it will take 20 seconds to create those 10 threads.i.e,one new thread in every two seconds, want to create all threads in a single shot, put zero in this
  • Forever - this option tells to keep sending requests to the tested application indefinitely. If disabled, JMeter will repeat the test for the number of times entered in the Loop Count box.
  • Loop Count - the number of times it has to repeat the test, it is effective only if the Forever check box is unchecked
  • Scheduler - want to specify the start and end time of the test, you have an option here
Once the Thread Group is configured add a Sampler called "HTTP request"

Provide the server name, port number, method etc

HTTP Request configuration
  • Server Name or IP - the server name or the IP address of the machine running the application being tested.
  • Port Number - the port number used by the web application
  • Protocol - the protocol used, either HTTP or HTTPS.
  • Method - the request method, either GET/POST/PUT or other options.
  • Path - the relative path to the page you want to hit
  • Follow Redirects - follows redirections sent by the Web application, if any.
  • Use KeepAlive - if checked, sends the Connection = Keep-Alive request header. By default, an HTTP 1.1 browser uses Keep-Alive as the value of the Connection header. Therefore, this checkbox should be checked.
  • Parameters - the list of parameters sent with this request. Use the Add and Delete buttons to add and remove parameters.
  • Send a file with a request - simulate a file upload to the Web application, good to test a large file upload through POST request scenario
  • Retrieve all images and Java Applets - download embedded content.
Add a couple of listeners "View results as Table" & Spline visualizer to see the load test results

Now save the project and run the Test, you will be seeing the samples in your configured listeners, here you can find the time taken for each thread sample hit and status of the request served by Server, number of bytes transfered and start time of the samples
Results in a Table

Result in Spline visualizer

Now fiddle with your code to tweak the performance.

Thursday, July 1, 2010

Windows could not start the Windows Process Activation Service service on Local Computer.

Got a hit from my IIS 7, which hosts Share Point 2010.World wide web publishing service refused to start as there is a dependency with Windows Process activation service. It just says

The World Wide Web Publishing Service service depends on the Windows Process Activation Service service which failed to start because of the following error: The system cannot find the file specified

Restarting WAS results in

"The Windows Process Activation Service service terminated with the following error:The system cannot find the file specified."

Fortunately Scott Hanselman's blog article comes to the rescue to identify the issue. Some of folders within c:\inetpub was missing and Scott taught the way to locate the problem using Process monitor.

Good to have an additional tool narrow down the issue.