cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Froehlich" <>
Subject RE: [Warning] StoreJanitor
Date Tue, 05 Feb 2002 20:10:03 GMT
<sigh> this stuff is so demotivating :-/.

>From: Berin Loritsch []
>I noticed something interesting from Java's Performance FAQ.  It has
>a number of VM tuning strategies that can be used by HotSpot 1.3+.
>The faq ( has
>an entry for pooling, calling System.gc(), etc.
>Should I pool objects to help GC? Should I call System.gc() periodically?
>Should I warm up my loops first do that Hotspot will compile them?
>The answer to all these questions is No!
>Pooling objects will cause them to live longer than necessary. The
>garbage collection methods will be much more efficient if you let it
>do the memory management. We strongly advise taking out object pools.
>[ Editorial note:  Component pooling and connection pooling have real
>   measured performance gains.  These are due to the fact that they are
>   expensive to create.  The comment is more for simple objects that are
>   pooled. ]

Ok but we pool our objects to increase our generating performance. I think
that's a good deal, or?

>Don't call System.gc(), HotSpot will make the determination of when its
>appropriate and will generally do a much better job.  If you are having
>problems with the pause times for garbage collection or it taking too long,
>then see the pause time question above.
>[ Editorial note: There is an option to disable explicit garbage collecting
>   calls to test this statement. (-XX:-DisableExplicitGC) ]
>Warming up loops for HotSpot is not necessary.  HotSpot now contains On
>Stack Replacement technology which will compile a running (interpreted)
>method and replace it while it is still running in a loop.  No need to
>waste your application's time warming up seemingly infinite (or very long
>running) loops in order to get better application performance.
>[ Editorial note: This does not apply to benchmarking.  Do warm up the
>   VM by running your benchmark for a period of time before collecting
>   results. ]

Hmm more stuff to think about! Is this only Hotspot. How when people use
the classic JVM? I have long discussion in the jakarta-commons group. Some
people say, that the JVM GC is doing a good job and it would be better to
let him work.
In the meantime I have the same opinion. You can't really control the JVM.
I try this now over a very long period and somehow I don't get to a really
success. Maybe it would be better throw out this StoreJanitor stuff and Co.
and only do the LRU and MRU stuff. Or we leave the StoreJanitor, but don't
call the GC anymore!
It's no problem for me. I'm not married with that stuff and don't wanna hinder 
the success of Cocoon.



Never share a foxhole with anyone 
braver than you are.

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

View raw message