tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: Tomcat scalability
Date Sun, 03 Nov 2002 22:24:25 GMT
Although this might be completely meaningless in you situation, I'll
post it for orientation anyway. The benchmarks were done on 1 GHz Athlon
machine with 1/2 GB RAM and 80 GB IDE disk, running JBoss 2.4.7, Tomcat
3.3.1, Apache 2.0.43, mod_jk 1.2.0 on RedHat Linux 7.3, with IBM JDK
1.3.1 release cxia32131-20020622. The database used was PostgreSQL
7.2.3. Apache, mod_jk and PostgreSQL were compiled with gcc 3.2 by yours
truly.

The first benchmark was a fetch of a Model 1 JSP page which displays the
entry page in the product catalogue search. There was database access on
each request in order to retrieve categories and manufacturers, so it's
not just a simple "get the HTML page". The benchmark command was:

ab -k -c 10 -n 1600 http://www.firstsite.dev/products/index.jsp

---------------------------------------------------
Server Software:        Apache/2.0.43
Server Hostname:        www.firstsite.dev
Server Port:            80

Document Path:          /products/index.jsp
Document Length:        6246 bytes

Concurrency Level:      10
Time taken for tests:   104.284779 seconds
Complete requests:      1600
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      10393600 bytes
HTML transferred:       9993600 bytes
Requests per second:    15.34 [#/sec] (mean)
Time per request:       651.780 [ms] (mean)
Time per request:       65.178 [ms] (mean, across all concurrent
requests)
Transfer rate:          97.33 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   370  650 166.8    610    1975
Waiting:      370  649 166.5    610    1975
Total:        370  650 166.8    610    1975

Percentage of the requests served within a certain time (ms)
  50%    610
  66%    652
  75%    685
  80%    709
  90%    826
  95%    935
  98%   1069
  99%   1450
 100%   1975 (longest request)
---------------------------------------------------

The next benchmark was on the same machine, but with a home page
containing dynamic content (i.e. from the product catalogue) fetched via
JBoss (i.e. EJB), using Velocity/PumpServlet in a Model 2 scenario.
However, the database content was cached in this case for the period of
60 seconds, so all requests but the first would have been cached.
Failures are due to uneven sizes of responses, which ab doesn't much
like. The benchmark command was:

ab -k -c 10 -n 1600 http://www.secondsite.dev/home.vm

---------------------------------------------------
Server Software:        Apache/2.0.43
Server Hostname:        www.secondsite.dev
Server Port:            80

Document Path:          /home.vm
Document Length:        7686 bytes

Concurrency Level:      10
Time taken for tests:   35.808597 seconds
Complete requests:      1600
Failed requests:        958
   (Connect: 0, Length: 958, Exceptions: 0)
Write errors:           0
Keep-Alive requests:    1590
Total transferred:      12796992 bytes
HTML transferred:       12300474 bytes
Requests per second:    44.68 [#/sec] (mean)
Time per request:       223.804 [ms] (mean)
Time per request:       22.380 [ms] (mean, across all concurrent
requests)
Transfer rate:          348.99 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    17 9483 6127.2   9102   24601
Waiting:        0  222 196.7    174    1908
Total:         17 9483 6127.2   9102   24601

Percentage of the requests served within a certain time (ms)
  50%   9102
  66%  11757
  75%  13960
  80%  15069
  90%  18484
  95%  20366
  98%  22186
  99%  23182
 100%  24601 (longest request)
--------------------------------------------------

To have something to compare against, here is the benchmark for static
HTML from the same machine:

ab -k -c 10 -n 1600 http://www.rexursive.dev/index.html

--------------------------------------------------
Server Software:        Apache/2.0.43
Server Hostname:        www.rexursive.dev
Server Port:            80

Document Path:          /index.html
Document Length:        25288 bytes

Concurrency Level:      10
Time taken for tests:   0.606350 seconds
Complete requests:      1600
Failed requests:        0
Write errors:           0
Keep-Alive requests:    1590
Total transferred:      41047560 bytes
HTML transferred:       40460800 bytes
Requests per second:    2638.74 [#/sec] (mean)
Time per request:       3.790 [ms] (mean)
Time per request:       0.379 [ms] (mean, across all concurrent
requests)
Transfer rate:          66108.68 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     3  175 105.3    163     397
Waiting:        0    1   2.0      1      22
Total:          3  175 105.3    163     397

Percentage of the requests served within a certain time (ms)
  50%    163
  66%    207
  75%    256
  80%    285
  90%    340
  95%    367
  98%    382
  99%    389
 100%    397 (longest request)
--------------------------------------------------

You can see that Apache 2 can deliver over 2.5k requests per second on
the page 3 times the size of those dynamic pages. So, if you were to
serve static content (or something you prepared earlier :-), Apache 2
wouldn't even blink, especially on the hardware you have.

I know you have a much better machine, but 1600 transactions does seem a
bit high. By all means, do your own benchmarks before you commit to
anything.

Bojan

On Sun, 2002-11-03 at 18:39, ryan wrote:
> 1. For a project my company is working on we have transactions 
> requirements of 1600 transactions per second.  The transactions consists 
> of processing a servlet in Tomcat, doing a database call and then 
> displaying the results to the user so the effective number of transactions
> Tomcat has to process is actually greater than 1600.
> 
> Can Tomcat cope with 1600 requests in a second(a 4 processor Sunfire 
> machine will be used)?  
> 
> Based upon our current application architecture(our java application has 
> tomcat running inside it), 1600 request per second means we may have 
> 1600 threads open simultaneously.  
> 
> 2. From one article I read at linux journal, Tomcat 3 didn't scale very 
> well with multiple processors because of JVM issues.


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message