You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Wall <d....@computer.org> on 2005/06/16 19:06:54 UTC
Out of memory
This is no doubt a java-related question, but it seems that with virtual
memory, my JVM should never run out of memory (aside from a nasty bug
and lack of swap disk space). Is there a way to allow my web
application to have as much memory as the OS will give it, yet not have
the JVM attempt to consume all that space before the GC reclaims the
space? I'd like the JVM to start with 64M, max out around 1GB in terms
of "holding the memory," yet allow it to use more memory when it needs
it, and then have it attempt to release that memory so as not to cause
swapping once the high memory need has disappeared.
Can this be done?
Thanks,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Out of memory
Posted by Christoph Kutzinski <ku...@gmx.de>.
Hi,
first: You should start a new discussion thread, if you have a new
question instead of answering to an existing one. Readers may not see
your question if you don't.
-XX:+UseAdaptiveSizePolicy works good for me (with Java 5.0). Just give
the VM a very big maximum heap size and the gc algorithm will determine
for itself how much of the memory it needs.
Here is more info:
http://java.sun.com/developer/JDCTechTips/2005/tt0216.html#2
hth,
Christoph
David Wall wrote:
> This is no doubt a java-related question, but it seems that with virtual
> memory, my JVM should never run out of memory (aside from a nasty bug
> and lack of swap disk space). Is there a way to allow my web
> application to have as much memory as the OS will give it, yet not have
> the JVM attempt to consume all that space before the GC reclaims the
> space? I'd like the JVM to start with 64M, max out around 1GB in terms
> of "holding the memory," yet allow it to use more memory when it needs
> it, and then have it attempt to release that memory so as not to cause
> swapping once the high memory need has disappeared.
>
> Can this be done?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org