I am not aware of all the performance implications of
this, but it should be possible to create a Thread to
run on some interval you define which just infinitely
loops a call for garbage collection (gc() right?) then
goes back to sleep until next iteration.

At least then you can control how often garbage
collection happens, and I suppose it is possible that
doing it more regularly could imply less stuff needs
to be collected each iteration, than to wait for the
JVM to get the GC going.  Then again, maybe a GC
awakening, no matter how little the work, is a very
expensive process.  I don't know.

Anyway, if you absolutely need that kind of
performance, I do believe there are licenses available
for Realtime Garbage Collection engines.  At least Dr.
Mark Johnstone did his dissertation on them, so I
assume they exist somewhere.

--- Donie Kelly <[EMAIL PROTECTED]> wrote:
> Hi all
> I am running tomcat 4.0.1 with virtual hosting and
> was wondering how much
> memory to allocate to each additional host. By
> default, we use 64M for one
> host but adding another 64M for second host seems
> excessive considering it's
> the same tomcat instance.
> However, if we add a lot the JVM will use more
> memory before garbage
> collection and we've seen a 30 second (!!!) delay
> when using 1G Ram on JVM
> as it just kept using memory until it ran out. It
> then had almost 1G of ram
> to garbage collect. How can I force garbage
> collection to be more aggressive
> and do it more often when garbage is small enough
> not to cause a problem?
> As we need this to run in a production environment
> we cannot possible allow
> a JVM to go for a garbage break for 30 seconds!!!!
> Any insight or help is greatly appreciated.
> Donie
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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

Reply via email to