views:

144

answers:

5

I have developed an application that will create lot of PDF's and serve those file. (Its normal Servlet-Buffering serving).

How to make sure my application works efficient with multiple request? Is there any tool available to test the load/scalability/efficiency and how many parallel request does my code handle with the current server configuration?

+1  A: 

You can use a load tester like Tsung

MathGladiator
+1  A: 

You should consider using load test tools like grinder or jmeter. grinder supports scripting while jmeter lets you turn junit into load test client. I personally like jmeter because of junit support and also its fine gui control and reporting. jmeter support http and soap out of the box. Additionally, you can write you own plugins to fit your custom needs.

Oscar Chan
+1  A: 

I would also recommend JMeter. You can also record the page requests of your browser to create a JMeter test (HTTP Proxy Server).

bwalliser
+1  A: 

You should also have surveillance tools in place to see how the application behaves under load.

A good start is jvisualvm which is in the latest Sun JDK.

Thorbjørn Ravn Andersen
A: 

The simplest thing you can do is Apache benchmark which is probably already installed if you're running a Unix based system or comes with Apache Webserver 2.x for Windows.

Example use;

$ ab -n 1000 -c 20 http://www.google.com/

Gives me this output;

This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.google.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        gws
Server Hostname:        www.google.com
Server Port:            80

Document Path:          /
Document Length:        218 bytes

Concurrency Level:      20
Time taken for tests:   1.826 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Non-2xx responses:      1000
Total transferred:      807000 bytes
HTML transferred:       218000 bytes
Requests per second:    547.55 [#/sec] (mean)
Time per request:       36.527 [ms] (mean)
Time per request:       1.826 [ms] (mean, across all concurrent requests)
Transfer rate:          431.51 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        9   12  14.7     10     337
Processing:    11   24  26.8     17     306
Waiting:       11   22  21.1     16     297
Total:         21   36  30.5     28     350

Percentage of the requests served within a certain time (ms)
  50%     28
  66%     36
  75%     39
  80%     41
  90%     45
  95%     54
  98%     93
  99%    253
 100%    350 (longest request)
HarryF