You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kim soon il <su...@hananet.net> on 2000/10/09 05:01:28 UTC

[Apaceh + Tomcat User] How I can Modify the Default JVM Settings ???

	Hi Kind Tomcat User!
	How I can Modify the Default JVM Settings ???

http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-ug.html#real_world_tips

Modify the Default JVM Settings 
The default JVM settings in the tomcat script are very naive; everything is left for defaults. There are a few things that you should consider to improve your Tomcat performance: 

Modify your JVM memory configuration. Normally the JVM allocates an initial size for the Java heap and that's it, if you need more then this amount of memory you will not get it.
Nevertheless, in loaded sites, giving more memory to the JVM improves Tomcat's performance. You should use command line parameters such as -Xms/-Xmx/-ms/-mx to set the minimum/maximum size of the Java heap (and check to see if the performance was improved). 
Modify your JVM threading configuration. The SUN JDK1.2.2 for Linux comes with support for both, green and native threads. In general native threads are known to provide improved performance for I/O bound applications, green threads on the other hand put less stress on the machine. You should experiment with these two threading models and see which model is better for your site (in general, native threads are better). 
Select the best JVM for the task. There are several JVM vendors, for example on Linux there are today (21/03/2000) two product level JVMs: the SUN JDK1.2.2 and the IBM JDK1.1.8. If your application does not require a specific JDK functionality, you should benchmark the two JVMs and select the better one. In my (Gal Shachor) internal tests I found the IBM JVM significantly faster than the one created by SUN, you should check that for yourself and make a calculated decision. 

Re: [Apaceh + Tomcat User] How I can Modify the Default JVM Settings ???

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Kim soon il wrote:

>         Hi Kind Tomcat User!
>         How I can Modify the Default JVM Settings ???
>

That is what the TOMCAT_OPTS environment variable is for.

Any settings you specify here are passed to the JVM when you start Tomcat.  You do not need to modify the scripts.

Craig McClanahan

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat