Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "HowTo/FasterStartUp" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/HowTo/FasterStartUp?action=diff&rev1=13&rev2=14

Comment:
Add several Tomcat 7 tips to speed Tomcat start up

  
  == Jars ==
   1.  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.
+  2.  Tomcat 7.+: You can add jars that do not need to be scanned for TLD 
files, Annotations and Web fragments to the value of 
`tomcat.util.scan.DefaultJarScanner.jarsToSkip` property in 
conf/catalina.properties file. Maybe later there would be a more convenient way 
to configure this feature.
  
  == Memory ==
   1.  Tweak memory parameters - Google is your friend.
@@ -16, +17 @@

  
   1.  Make sure your code is not doing slow things. (Use a profiler)
   2.  Remove any webapps you don't need. (So remove the all the webapps 
installed with tomcat)
-  
+  3.  Add metadata-complete="true" attribute to the <web-app> element of your 
WEB-INF/web.xml file, if you do not need the features that are enabled by the 
default value of "false" of that attribute. This way Tomcat would not waste 
time scanning the libraries to autodiscover annotated classes and web fragments.
+ 
+ == Starting several web applications in parallel ==
+ 
+  1.  With Tomcat 7.0.23+ you can configure it to start several web 
applications in parallel. This is disabled by default but can be enabled by 
setting the `startStopThreads` attribute of a '''Host''' to a value greater 
than one.
+ 
+ == Entropy Source ==
+  1.  Tomcat 7+ heavily relies on !SecureRandom class to provide random values 
for its session ids and in other places. Depending on your JRE it can cause 
delays during startup if entropy source that is used to initialize 
!SecureRandom is short of entropy. You will see warning in the logs when this 
happens, e.g.:
+ 
+ {{{
+ <DATE> org.apache.catalina.util.SessionIdGenerator createSecureRandom
+ INFO: Creation of SecureRandom instance for session ID generation using 
[SHA1PRNG] took [5172] milliseconds.
+ }}}
+ 
+  There is a way to configure JRE to use a non-blocking entropy source by 
setting the following system property: `-Djava.security.egd=file:/dev/./urandom`
+ 
+  Note the "`/./`" characters in the value. They are needed to work around 
known [[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6202721|JRE bug 
#6202721]].
+ 
  ----
  [[CategoryFAQ]]
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to