On 25/03/2010 16:05, George Sexton wrote: > I have a question about how Tomcat 5.5 starts up. I'm looking through the > source code of 5.5.28 trying to follow it and I'd appreciate it if someone > could clarify a point or two for me. > > From reading the server.xml, the hierarchy of containers in Tomcat is: > > Server > Service > Engine > Host > > I'm not using contexts declared in the server.xml so I'm omitting them. > > Looking through the source code, the classes seem to be defined in the same > hierarchy. There's StandardServer, StandardService, StandardEngine, > StandardHost. > > It looks like StandardEngine.start() invokes ContainerBase.start() which I'm > guessing starts each one of the hosts using this loop: > > Container children[] = findChildren(); > for (int i = 0; i < children.length; i++) { > if (children[i] instanceof Lifecycle) > ((Lifecycle) children[i]).start(); > } > > Is this interpretation correct?
Correct. > My server.xml has over 300 hosts defined and startup time is getting pretty > big. There doesn't seem to be a difference in startup time between a quad > core server and a single core server. It appears to me this is because > startup of the hosts is sequential. In the best of all possible worlds it > would be nice if 4 cores means 4x faster startup. Start-up is currently single threaded. Patches welcome... Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org