Reputation: 1274
I am using wildfly-9.0.1.Final on server.
Allocated memory is 20 GB with UseG1GC and UseStringDeduplication(with default threshold) flag.
I faced high memory usage on server, for troubleshooting I had collected heapdump. I used Eclipse MAT for heapdumnp analysis. The problem suspect suggest large nos. of String and StringBuilder object.
When I run String: group by value. I saw large number of duplicate String.
String Value | Objects | Shallow Heap | Avg. Retained Size | Retained Heap
--------------------------------------------------------------------------------------------------------------------------
/D:/wildfly-9.0.1.Final/bin/content | 12,67,828 | 3,04,27,872 | 112 | >= 135.42 MB
/D:/wildfly-9.0.1.Final/bin/content/myApp-ear.ear | 12,67,828 | 3,04,27,872 | 144 | >= 174.11 MB
/D:/wildfly-9.0.1.Final | 12,67,827 | 3,04,27,848 | 88 | >= 106.40 MB
/D:/wildfly-9.0.1.Final/bin | 12,67,827 | 3,04,27,848 | 96 | >= 116.07 MB
/D:/wildfly-9.0.1.Final/bin/content/myApp-ear.ear/lib | 12,64,464 | 3,03,47,136 | 152 | >= 183.29 MB
I have check for some of the String and path to GC It look like this String is constructed by JVM/container.
Is there any configuration to avoid these large nos. of String objects or I can troubleshoot this issue further.
Upvotes: 2
Views: 1152