How to check the scalability of my application
Asked Answered
A

6

7

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?

Antecedent answered 26/9, 2009 at 4:53 Comment(0)
O
4

You can use a load tester like Tsung

Otolith answered 26/9, 2009 at 5:3 Comment(0)
P
1

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.

Peptide answered 26/9, 2009 at 7:46 Comment(0)
B
1

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

Bly answered 26/9, 2009 at 8:1 Comment(0)
F
1

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.

Fabrizio answered 26/9, 2009 at 9:37 Comment(0)
P
1

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)
Pyroxene answered 28/9, 2009 at 14:14 Comment(0)
I
0

Apachebench is a single-thread tool. It means that it will not be able to saturate a SMP server (either muti-thread or multi-process).

You should rather consider weighttp, which is using the AB syntax (the only difference is that -t 4 means use 4 worker threads instead of a 4-second test).

Imposture answered 5/12, 2011 at 12:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.