On 2/16/2016 9:13 AM, Ty wrote:
·         When Tomcat 7 was released, our testing showed a 10-to-20-fold
increase in memory consumption and a 3-to-5-fold increase in startup time
for our test case (100 deployed webapps).  After some digging we determined
that these increases were related to JAR scanning
(tomcat.util.scan.DefaultJarScanner).  When setting jarsToSkip=*, the
memory consumption was decreased to something somewhat more reasonable
(2-3x increase over Tomcat 6) and the startup time went back to what we
were used to with Tomcat 6.  However at that time we opted to stay on
Tomcat 6, because our apps were not functional with jarsToSkip=*, and we
deemed it impractical to manage a very large “blacklist” in the jarsToSkip
Property.



I'll just throw in my experiences. I'm running around 800+ copies of a web app on tomcat 7.

First, to get Tomcat 7 to start in under a century, I had to do jarsToSkip. It hasn't been a big problem to maintain since. Fortunately for me as well, my app doesn't use annotations in any significant way so I'm pretty lucky there.

Second, I moved all of the generic jars into ${catalina.base}/lib. My web app's jar uses statics, so each webapp has perhaps a single 1.5MB jar in the context WEB-INF/lib. This is bad because now I pretty much have to upgrade all instances in lock-step otherwise I run into version dependencies with ${catalina.base}/lib files. Still, it's an acceptable tradeoff. If this were possible for you, I'd definitely give this a go.

My startup times are around 30 seconds. A huge part of my remaining startup times are caused by loading each instance's unique database. When I put the databases on SSD, things were lots better :)

Right now, I have 48GB allocated to the JVM. Really, it's using 16GB of eden space, and it's got around 32GB dedicated to Old Gen, but it's really only using 5GB of space in Old Gen. Survivor space is under 256MB. I suppose I could do some tuning with various parameters to force more allocation to eden space, and less to old gen, but performance is really good, and I don't have any motivation to do it.


--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com

Reply via email to