Hello, I am in the process of upgrading from Tomcat 7.0.54 to Tomcat 8.0.9 and am seeing some performance degradation in my webapp.
Configuration info: Ubuntu 14.04.1 LTS java version "1.8.0_11" Java(TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode) Both versions of tomcat use the APR Connector with TC Native 1.1.31 statically linked against APR 1.5.1 and OpenSSL 1.0.1h I'm running identical requests to identical web apps between these tomcats and in Tomcat 8 I'm seeing an ~20% response time increase and as such a similar reqs / sec decrease. After using VisualVM to profile the application I've narrowed it down to the JRE's JAXP library taking significantly longer to create its xml validation "SchemaFactory" which doesn't make sense to me because I'm using the same JRE in both tests. I know that the Resources implementation was overhauled in Tomcat 8 so is there any possibility that this could be a side effect? For a better idea of what I'm talking about, see the below VisualVM screenshots of a profiling snapshot's call tree: Tomcat 7 - http://i.imgur.com/pbX5xBG.jpg Notice how the time spent in the javax.xml.validation.* methods is <6% Tomcat 8 - http://i.imgur.com/Txv20lg.jpg Notice how the time spent in these methods is significantly higher. Again, I'm confused as to how the performance of the JRE's library changes between tomcat versions, can anyone explain this to me or point me in the right direction on where to look? Is it as simple as a config change or will it require a java code change? The XmlUtils.validate method you see in the screenshot is simply the following: javax.xml.validation.SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); Here are the Tomcat configurations: Tomcat 8 server.xml: http://pastebin.com/Tn3d6bXd Tomcat 8 context.xml: http://pastebin.com/reuJCGNq Tomcat 7 server.xml: http://pastebin.com/Kq6SfFd0 Tomcat 7 context.xml: http://pastebin.com/vdp0PGPh Does anyone have any idea why this might be performing so differently between versions of tomcat? Could it be a bug in the JRE? I can try and provide test code for repro if it helps. Thanks in advance, Peter Rifel --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org