Enable UseStringDeduplication where feasible
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
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