A Java Virtual Machine on 32-bit operating systems typically has a
maximum heap size of 64Mb. The JVM heap space is where all Java objects
are stored, as well as memory used by the garbage collector. Sun
recommends increasing this value for server applications. We may need to
increase the memory limit for better performance. We may increase the
size at application level or server level.
Standalone Java Applications
The Java Virtual Machine takes two command line arguments which set the initial and maximum heap sizes:
-Xms and -Xmx. For example if you want to give your Java program needs a 64Mb initial and 256Mb maximum heap size you could launch it as follows:
java -Xms64m -Xmx256m jdbc_prog
Setting the heap size for Tomcat and Java UDRs are variations on the theme and involve figuring out where to pass these arguments to the JVM.
Apache Tomcat
To increase minimum and maximum heap size for Tomcat applications set the CATALINA_OPTS environment variable before starting Tomcat. To set the same heap sizes, on UNIX edit the Tomcat startup.sh script and add a line:
export CATALINA_OPTS=-Xms16m -Xmx256m;
Or, you may create this environment variable at /etc/profile file in Linux. In such case, you have to reboot the system to make effective this variable.
For More details:
http://informix-zone.com/node/46?bcsi-ac-79063B1DC99A4FDC=1EC1831D00000002ERDlmuR0rs6ge6dByf9wH
Standalone Java Applications
The Java Virtual Machine takes two command line arguments which set the initial and maximum heap sizes:
-Xms and -Xmx. For example if you want to give your Java program needs a 64Mb initial and 256Mb maximum heap size you could launch it as follows:
java -Xms64m -Xmx256m jdbc_prog
Setting the heap size for Tomcat and Java UDRs are variations on the theme and involve figuring out where to pass these arguments to the JVM.
Apache Tomcat
To increase minimum and maximum heap size for Tomcat applications set the CATALINA_OPTS environment variable before starting Tomcat. To set the same heap sizes, on UNIX edit the Tomcat startup.sh script and add a line:
export CATALINA_OPTS=-Xms16m -Xmx256m;
Or, you may create this environment variable at /etc/profile file in Linux. In such case, you have to reboot the system to make effective this variable.
For More details:
http://informix-zone.com/node/46?bcsi-ac-79063B1DC99A4FDC=1EC1831D00000002ERDlmuR0rs6ge6dByf9wH
No comments:
Post a Comment