tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <>
Subject Object pooling performance
Date Tue, 08 Jul 2003 14:25:27 GMT
Remy Maucherat wrote:
> Bill Barker wrote:
>> Now, if we could only convince the Jasper developers of this ... ;-).
> Tag pooling is definitely not the same situation and use case as session 
> pooling. Tag pooling *is* useful in many cases.

There are a number of things to consider when evaluating the performance of
object pooling.

The performance hit of obtaining/recycling an object can be greater than
instantiating a new object, it depends on the JVM.

But you also have to consider the impact on GC.  One big impact on performance
of Tomcat is the frequency of and the time it takes to do incremental and Full GC's.

Full GC's can be especially nasty. In most JVM's a Full GC freezes processing of
requests by Tomcat.  I would rather have a slight performance hit from recycling objects
than see the frequency of Full GC's increase and the time they take increase.

I saw a huge performance boost when recycling of JSP custom tags was implemented in
Jasper.  Most of that performance boost comes from reducing the frequency and length
of GC's.

To collect GC data add the -verbose:gc arg to java when you start Tomcat.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message