Java Application Performance Degrades when Multiple Threads are Processing Xstream Objects
(Doc ID 2370009.1)
Last updated on APRIL 25, 2020
Applies to:Java SE JDK and JRE - Version 7 and later
Information in this document applies to any platform.
A Java Application which has multiple threads creating Xstream objects for doing XML conversions with toXML() method experiences huge performance decreases between each Full GC. Performing the same task (toXML()) takes longer and longer until a Full GC. After a Full GC, the performance improves, but then gets slower and slower again until the next FullGC.
The issue can be reproduced on Linux with a program that creates a thread pool, where each thread repeatedly creates an Xstream to process toXML() calls. Such a test program shows that the time taken by a thread to complete the singular task ( toXML() ) is very fast initially (1-5 millliseconds) when the system is with less load. On increase of load, the same task is taking a longer and longer time until a Full GC is run. After the Full GC, the task is again completed in the 1-5 milliseconds, but again, successive runs of that task take longer and longer until the next Full GC.
The performance problem is initially noticed as reduced responsiveness. For example, when running such a program with WLS, this may appear as stuck threads blocked on classloader:
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document