Question : Fluctuating Free Memory of JVM with Tomcat

We have an application running on Tomcat (version details provided below).

We have the below configuration settings in catalina.sh

if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
        JAVA_OPTS="-Xms2048M -Xmx2048M -XX:MaxPermSize=512M -XX:PermSize=384M -XX:+UseParallelGC  $JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.Clas
sLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
fi

Event when we have 2-5 logged in users the tomcat manager shows very less available memory and fluctuates between 100MB to 250MB.

Version Details
Tomcat - Apache Tomcat/6.0.16
JVM Version - 1.5.0.03-_13_feb_2006_16_39
JVM Vendor - Hewlett-Packard Company
OS Name - HP-UX
OS Version - B.11.11
OS Architecture - PA_RISC2.0

Questions
1. What could be the possible reason for this fluctuation.
2. How can more memory be released.
3. Is there any configuration changes that you see has to be done.

We are planning to get a profiler run on the code to identify any possible memory leaks, but might take some time. So any leads to where we should be checking would be very much appreciated. Thank you.

Answer : Fluctuating Free Memory of JVM with Tomcat

Are you monitoring garbage collection?

This would normally mean that an application is not correctly cleaning up the storage it is using and the JVM is cleaning it up during GC.

However, you need to look at how much memory you application needs/is using.  For instances, it is doing a DB query and keeping the results in memory.  Does it pull in all of the results of the query, or does it table the results with "X" number per query (say like 100 results at a time).

Typically the amount of free memory will vary based on how many users are logged in, what they are doing, and what the application does.
Random Solutions  
 
programming4us programming4us