0

Background

Application server has been upgraded from tomcat 6 to tomcat 8. We are experiencing performance issues in transactions which involve XML processing using DOM4J and xerces api. The application uses dom4j-1.6.1.jar and xercesImpl-2.10.0.jar. There has been no change in the application which was deployed in tomcat 6 to the application deployed in tomcat 8.

Problem

We use Dynatrace to monitor our application. We have seen that in tomcat 8, the time taken for classloading api has increased significantly, leading to performance degradation. This

tomcat 8 classloading time and api breakdown leading to classloading

shows the time taken by the classloading api in Tomcat 8 and this

shows what was happening in tomcat 6

shows what was happening in tomcat 6.

From the above pics, we can see that Classloading is invoked from the xerces apis(Xml Processing in the pic), so the transactions using the xerces api have show performance degradation.

Please help in understanding why the classloading times have increased in tomcat 8 and how to get rid of this problem in tomcat8. Thanks.

elixenide
  • 44,308
  • 16
  • 74
  • 100
Abir
  • 33
  • 5

1 Answers1

0

Have you seen this blog? Check out the first comment which talks about configuration settings for Xerces: http://apmblog.dynatrace.com/2015/05/14/java-performance-impact-by-dynamic-class-loading/

Andreas Grabner
  • 645
  • 3
  • 7
  • Thanks for this. I think this will solve the problem as highlighted in another similar thread, http://stackoverflow.com/questions/6340802/java-xpath-apache-jaxp-implementation-performance. But I have a problem with this -When I am adding the mentioned jvm arguments in the tomcat startup script, its giving classNotfound exception as the org.apache.xerces classes are not available in the jdk lib and also in the Tomcat lib, but present in the webapp/lib. Could you please help what else I need to do, in order to startup tomcat with those jvm arguments. – Abir Nov 11 '15 at 16:52
  • 1
    was able to change the classpath in catalina to include xerces and xalan, which solved the problem. Thanks a lot for this. There is no time used up in classloading api now. – Abir Nov 13 '15 at 12:19