Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable UseStringDeduplication where feasible #1378

Open
schlosna opened this issue Aug 10, 2022 · 1 comment · Fixed by #1380
Open

Enable UseStringDeduplication where feasible #1378

schlosna opened this issue Aug 10, 2022 · 1 comment · Fixed by #1380

Comments

@schlosna
Copy link
Contributor

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
Copy link
Contributor Author

schlosna commented Apr 4, 2023

Reopening as #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant