Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How do I make Tomcat startup faster?

...

Jars

...

  1. If you are loading many web applications which which have the same jars in their WEB-INF/lib

then consider moving the shared jars from WEB-INF/lib into the tomcat shared directory $

...

{catalina.home

...

}/shared/lib

...

This will reduce the memory used by each web app, reduce the size of your your war files, and increase start up time. See http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

2. Remove any jar files you don't need. When searching for classes every JAR file needs to be examined to find the needed class. Also during webapp startup, jar files are searched for TLD files. If the jar file is not there - there is nothing to search. ==

Memory

...

  1. Tweak memory parameters - Google is your friend.

...


Config

...

  1. Trim the config files as much as possible. XML parsing is not cheap. The less there is to parse - the faster things will go.

...

Webapp

...

  1. Make sure your code is not doing slow things. (Use a profiler) 

...