Costin Manolache wrote:
Hans Bergsten wrote:


            Without pooling  With pooling  Reuse w/o overhead
-------------------------------------------------------------
5 threads
  Avg.:              330 ms        349 ms                 N/A
  Rate:            15.2/sec      13.6/sec                 N/A

20 threads
  Avg.:            1,752 ms      1,446 ms            1,265 ms
  Rate:            12.1/sec      13.6/sec            14.7/sec

To me, this indicates that if you can avoid _all_ reuse overhead,
there's some performace to be gained from reuse but not much. With the

From 1.2s to 1.7s there is about 35% difference. I would call this
quite significant. Even between 1.4 and 1.7 - you have 20%. Try to
increase the thread count to 100 - and you'll see this going up.

The difference ( 0.5s ) is probably 2-3 times the response time of
apache for a static page. And most users will feel it.
I agree that in percentage, the difference is somewhat significant,
but don't make too much out of the real value. My test server is not
representative of the type of hardware you would use for a site with
this type of load. On hardware suitable for the task, the difference in
the real values will likely be a lot smaller, and IMHO, insignificant.
But please, let's not start a long debate about what's significant or
not (that depends on too many factors). All I'm trying to show with
these simple tests is that for pooling to really make a difference at
all, you need to avoid all overhead, which may be very hard, and that
the overhead with current pooling seems to eat all potential gain.

current implementation, however, the overhead seems to kill all gains
from creating fewer instances. I doubt increasing MAX_POOL_SIZE makes
much of a difference.

Increasing it from the current 5 - it would make a difference. I agree - the "ideal" no overhead is harder to achieve, but I think the thread-local,no-sync case is close enough.
I'll try to reproduce the test. BTW, how many requests did you make, and
what was the max response time ( max is very affected by GC ) ? I usually do 5000 to warm up and 10.000 to run the test.
I ran 10,000 requests for each test case after a manual warm up (just a
few requests to give the JIT a chance to kick in). If I rerun the tests
to capture GC data (as Glen was asking for), I can run a longer warm-up
as well. I didn't record the max values, but IIRC they were around 100
sec in all cases.

This is a very good start, thanks for bringing this up.
I hope it at least gives us a better idea about what types of gains
we can realistically expect from tag handler reuse.

Hans
--
Hans Bergsten                                <[EMAIL PROTECTED]>
Gefion Software                       <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at                                    <http://TheJSPBook.com/>


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

Reply via email to