I got side tracked for a few days, but I finally got
time to run some benchmarks with JProbe, as well as
repeat a few of my original tests to verify the
performance.

The tests were ran on the following systems.

System I - 450mhz PIII, Win2K, 512mb RAM
programs running - mcafee, aim
Server - tomcat 4.0.3
additional connector - coyote beta 3

System II - 600mhz PIII, win2k, 256mb RAM
programs running - none
Server - tomcat 4.0.3
additional connector - coyote beta 3

load testing application
Latest JMeter from jakarta

Network - LAN

JProbe 30 -
added settings for Tomcat 4.0.3
test run - 2 threads 100 iterations
The results below is the total number of Tag objects
garbage collected for the entire duration of the test.
Garbage collection was trigger right before and
immediately after the run. The GC filter was set to
"taglibs*". The system used was #2 with 600mhz cpu and
no other apps running besides JProbe and Tomcat.

JProbe GC results
---------------------------------

include directive 
---------------------------------
IfTag - 11,200
WhenTag - 4,200
ExprTag - 2,800
SetTag - 1,400
OtherwiseTag - 1,200
ChooseTag - 1,200
Logger - 16,600

Total - 38,600

General memory/GC behavior - GC spiked much more
frequently than pages using action include. The
duration between GC was approximately half that of
action include.

action include
--------------------------------
IfTag - 11,00
WhenTag - 2,800
ExprTag - 2,600
Logger - 16,600

Total - 33,000

General memory/GC behavior - GC frequency was less and
the interval between GC was twice as long as pages
using include directive. It generally took 2-4x more
page hits to reach the heap max.

scriptlet page
--------------------------------
no tags were garbage collected, since none were used.
for the duration of the test, GC was trigger twice. In
comparison, include directive for the duration of the
test was called on average 30 times. action include
called GC approximately 15 times.


The results below were average from 3 runs of each
setting. The machine running JMeter was a separate
system. Only the HTML was retrieved. No images or
other files were included in the calculation of the
response times. Test performed on system #2 (600mhz,
256ram) were not heap optimized, since it is pointless
with 256mb of ram. All times are in milliseconds.

include directive - 1 thread 1000
----------------------------------
httpconnector ave - 32
cpu usage - 45-80%
coyote connector ave - 107
cpu-usage - 30-100%

include directive - 2 threads 500
----------------------------------
httpconnector ave - 403
cpu usage - 50-100%
coyote connector ave - 378
cpu usage - 40-100%

include directive - 4 threads 250
----------------------------------
httpconnector ave - 974
cpu usage - 70-100%
coyote connector - 474
cpu usage - 50-100%

include directive - 8 threads 125
----------------------------------
httpconnector ave - 2802
cpu usage - 100%
coyote connector ave - 1660
cpu usage - 60-100%

include directive - 16 threads 65
----------------------------------
httpconnector ave - could not finish
cpu usage - 100%
coyote connector ave - 2994
cpu usage - 80-100%

action include - 1 thread 1000
-----------------------------------
httpconnector ave - 48
cpu usage - 40-70%
coyote connector ave - 49
cpu usage - 40-60%

action include - 2 threads 500
-----------------------------------
httpconnector ave - 84
cpu usage - 55-95%
coyote connector ave - 86
cpu usage - 40-80%

action include - 4 threads 250
-----------------------------------
httpconnector ave - 190
cpu usage - 70-90%
coyote connector ave - 175
cpu usage - 50-90%

action include - 8 threads 125
-----------------------------------
httpconnector ave - 508
cpu usage - 70-100%
coyote connector ave - 372
cpu usage - 60-95%

action include - 16 threads 65
-----------------------------------
httpconnector ave - 1056
cpu usage - 90-100%
coyote connector ave - 808
cpu usage - 70-100%

action include - 32 threads 63
-----------------------------------
httpconnector ave - 2646
cpu usage - 100%
coyote connector ave - 1036
cpu usage - 80-100%

scriptlet page - 1 thread 1000
-----------------------------------
httpconnector ave - 22
cpu usage - 0-20%
coyote connector ave - 21
cpu usage - 0-16%

scriptlet page - 2 threads 500
-----------------------------------
httpconnector ave - 30
cpu usage - 20-40%
coyote connector ave - 28
cpu usage - 0-25%

scriptlet page - 4 threads 250
-----------------------------------
httpconnector ave - 49
cpu usage - 20-40%
coyote connector ave - 47
cpu usage - 20-35%

scriptlet page - 8 threads 125
-----------------------------------
httpconnector ave - 97
cpu usage - 20-40%
coyote connector ave - 97
cpu usage - 20-40%

scriptlet page - 16 threads 65
-----------------------------------
httpconnector ave - 179
cpu usage - 20-45%
coyote connector ave - 171
cpu usage - 20-40%

scriptlet page - 32 threads 63
-----------------------------------
httpconnector ave - 250
cpu usage - 30-60%
coyote connector ave - 257
cpu usage - 20-40%

scriptlet page - 64 threads 35
-----------------------------------
httpconnector ave - 445
cpu usage - 30-80%
coyote connector ave - 706
cpu usage - 40-90%


Tests running on system #1 were all run with the same
heap setting of "-Xms50m -Xmx280m". No additional
optimizations were used in the test.

include directive - 1 thread 1000
-----------------------------------
httpconnector ave - 24
cpu usage - 35-50%
coyote connector ave - 23
cpu usage - 30-45%

include directive - 2 threads 500
-----------------------------------
httpconnector ave - 35
cpu usage - 50-100%
coyote connector ave - 40
cpu usage - 50-90%

include directive - 4 threads 250
-----------------------------------
httpconnector ave - 241
cpu usage - 75-100%
coyote connector ave - 119
cpu usage - 65-100%

include directive - 8 threads 125
-----------------------------------
httpconnector ave - 962
cpu usage - 100%
coyote connector ave - 403
cpu usage - 65-100%

include directive - 16 threads 65
-----------------------------------
httpconnector ave - 3948
cpu usage - 100%
coyote connector ave - 1173
cpu usage - 90-100%

include directive - 32 threads 63
-----------------------------------
httpconnector ave - could not complete
cpu usage - 100%
coyote connector ave - 7907
cpu usage - 100%

action include - 1 thread 1000
-----------------------------------
httpconnector ave - 34
cpu usage - 60-80%
coyote connector ave - 35
cpu usage - 45-60%

action include - 2 threads 500
-----------------------------------
httpconnector ave - 59
cpu usage - 70-90%
coyote connector ave - 54
cpu usage - 55-80%

action include - 4 threads 250
-----------------------------------
httpconnector ave - 118
cpu usage - 75-95%
coyote connector ave - 112
cpu usage - 75-95%

action include - 8 threads 125
-----------------------------------
httpconnector ave - 221
cpu usage - 80-95%
coyote connector ave - 201
cpu usage - 75-100%

action include - 16 threads 65
-----------------------------------
httpconnector ave - 457
cpu usage - 85-100%
coyote connector ave - 423
cpu usage - 80-100%

action include - 32 threads 63
-----------------------------------
httpconnector ave - 1099
cpu usage - 100%
coyote connector ave - 860
cpu usage - 95-100%


One obvious result of these benchmarks is memory is
more crucial than CPU speed for site using lots of tag
with JSTL. Using scriptlet pages, memory is less of an
issue, but once GC kicks in, performance begins to
degrade rapidly. Sites that wish to use lot of tags
with include directive should consider having lots of
memory. Not having enough memory seriously impacts the
scalability of a website using JSP tags.

>From the JProbe garbage collection data, using tag
pooling is very desireable for deployments that use
lots of tags. Re-using tag classes will dramatically
decrease the amount of tag classes GC-ed and therefore
improve resposne time and concurrency.

peter


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to