tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haytham Samad" <hayt...@speakeasy.net>
Subject RE: Memory issue with Tomcat/4.0.3
Date Thu, 13 Feb 2003 17:38:25 GMT
I am not sure what -Xingcg is?  I am assuming you are using the incremental
garbage collector though.  This will only make the gc be done incrementally
as the name indicates and it might not be able to keep up with object
creation as your application is running.  There are other things going on as
well, depending on your jdk.  Which one are you using?

In any case, try this:

-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Xmx512m -Xms512m -XX:NewSize=24m -
XX:MaxNewSize=24m -XX:SurvivorRatio=2

depending on how your application is operating, hardware, object life-cycle,
etc. These settingc can be adjusted.  But for the GC, I would suggest you
use the -XX:+UseParNewGC -XX:+UseConcMarkSweepGC options (jdk must be 1.3
and above).  Also, when you set -Xmx500m and -Xms100m, the JVM starts with a
heap of size 100m and keeps readjusting it as it needs more memory up until
it hits the maximum of 500m.  So as it needs more it will keep growing and
might not release any as its needs go down?  That I am not sure of?  In any
case, if you do not want it to use more than a certain amount of memory,
just limit it's max.

If you have a lot of short lived objects play
with -XX:NewSize=24m -XX:MaxNewSize=24m -XX:SurvivorRatio=2 which affect the
amount of the heap allocated to new object creation (Eden and the Survivor
sections).  There are several guides on sun's site that discuss how to tweak
these settings in detail but again, this is really application dependant and
many things can be going on.

Hope this helps...

Cheers,

Haytham

-----Original Message-----
From: alain@h50.fbsims.com [mailto:alain@h50.fbsims.com]
Sent: Wednesday, February 12, 2003 11:37 AM
Subject: Memory issue with Tomcat/4.0.3


Hi all,

I am experiencing some memory trouble when the
tomcat server is running. I have set the the
following java runtime options, -Xmx500m -Xms100m -Xingcg.
I know that these values are not the best to use.
Anyways, I'm keeping track of the freeMemory with the servlet
programs and its always reporting ~ 80-70 MB out of the inital 100, which is
fine.

My problem is when "top" or "free" report the amount of used memory.
It keeps growing and growing. It seems to me that the free memory from
the tomcat threads is not being released to the system.

Is this a correct assumption?

Can someone shed some light here, I'm all out of ideas!!!

Thanks
Alain



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message