Sunday, 20 March 2016

How to modify the default JVM settings ?


There are a few things that you should consider to improve your Tomcat performance :

1. 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).

2. Modify your JVM threading configuration
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).

3. Select the best JVM for the task
If your application does not require a specific JDK functionality, you should benchmark the two JVMs and select the better one.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.