sls-packaging icon indicating copy to clipboard operation
sls-packaging copied to clipboard

Enable UseStringDeduplication where feasible

Open schlosna opened this issue 3 years ago • 1 comments

OpenJDK 17.0.2 fixed https://bugs.openjdk.org/browse/JDK-8277981 so worth re-testing and consider enabling -XX:+UseStringDeduplication by default when using supported GC on JDK 17+ to both reduce string heap bloat and streamline comparisons in string heavy services.

https://github.com/openjdk/jdk/blame/8d7958e46969fd59df7bc6dd1cbe31ae63686b05/src/hotspot/share/gc/shared/stringdedup/stringDedupConfig.cpp#L116-L155

schlosna avatar Aug 10 '22 01:08 schlosna

Reopening as https://github.com/palantir/sls-packaging/pull/1452 reverted -XX:+UseStringDeduplication until we can more broadly performance test.

G1 and Shenandoah GC support string deduplication as of JDK 17

https://openjdk.java.net/jeps/192 https://bugs.openjdk.org/browse/JDK-8264718

Only enable on JDK 17+ due to fix https://bugs.openjdk.org/browse/JDK-8277981

JDK 18+ enable string deduplication for SerialGC, ParallalGC, and ZGC. https://malloc.se/blog/zgc-jdk18

schlosna avatar Apr 04 '23 14:04 schlosna