views:

597

answers:

3

I have a web service I'm trying to load test. I created a program that spawns threads to simulate multiple users connecting to the service and making a request. Each thread makes "some number" of requests before it dies. Each new request is made as soon as it is ready - there is little to no delay between getting a response and making the next request. The web service under test calls another web service on the same server.

This process seems to work fine up to 90 simulated users. Once I try 100 simulated users however, the programs hang after about 6 total processed requests. They don't seem to be doing anything. The simulated clients are hung waiting for responses and the web service is not receiving the requests. It takes a server restart to recover.

What's going on here? Is there a limit to the number of connections I can make to the server? Should I attempt to "ramp up" the load (right now I'm just firing them as fast as I can)?

The server I'm using us Java Caps 5.1.3 application server and the library I'm using to make the requests is HttpUnit 1.6.2.


Followup Question What's the benefit of the ramp up time? Why can't I just push all the load to the server at the start of the test?

+2  A: 

See there can be multiple causes for this happening, you can try the approach below to figure out the cause. Hope they help:

1. Use Ramp-up

Use a decent ramp-up, say atleast 1user/2 seconds or such. If using Ramp-up solves your problem, then its definitely a Connection Count issue.

2. Code Review

Thoroughly check the load-injection code you have written,for unexited loops/thread in some cases.

You can also use a profiling utility, e.g. JENSOR to find out which method is going into a deadlock and causing the server to be unresponsive.


Also, Check these parameters on your web-server and tweak them and test

  • MaxThreads
  • MaxProcesses
  • MaxSessionCount


Answer for Follow-up Question

The ramp-up simulates a real-life scenario, and at the same time gives a breathing space to the Web Server. When doing load-testing, the pattern should be as similar to the real life to get accurate and scalable predictions.

The parameters which play the most important part in doing this are:

  • Ramp-up
  • Think Time
  • Pacing b/w iterations
  • Transaction Mix
  • No. of concurrent users
Mohit Nanda
+1  A: 

I think you should try using JMeter for load testing. It has all the ramp-up stuff. This PPT presentation compares the two, so you can see which fits you better.

Yuval F
+2  A: 

Answer for Follow-up Question

The ramp-up simulates a real-life scenario, and at the same time gives a breathing space to the Web Server. When doing load-testing, the pattern should be as similar to the real life to get accurate and scalable predictions.

The parameters which play the most important part in doing this are:

  • Ramp-up
  • Think Time
  • Pacing b/w iterations
  • Transaction Mix
  • No. of concurrent users
Mohit Nanda