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

Change recommended JVM flags for OpenJ9 on wiki #28

Open
Phoenix-Starlight opened this issue Oct 7, 2023 · 0 comments
Open

Change recommended JVM flags for OpenJ9 on wiki #28

Phoenix-Starlight opened this issue Oct 7, 2023 · 0 comments

Comments

@Phoenix-Starlight
Copy link

What's wrong with the flags recommended

  1. The GC pause time target flag won't do anything, because that isn't what OpenJ9 accepts on the default garbage collector (also 6ms is ridiculously unreasonable)
  2. The G1 flags are useless, because there is no G1GC on OpenJ9
  3. Explicitly setting generation sizes is not necessarily wrong but can easily shoot you in the foot
  4. Setting GC threads is invalid in the default GC of OpenJ9
  5. Setting a maximum on the tenuring threshold is not a good choice (java dynamically adjusts but considers the maximum... which way smaller than the hard maximum)
  6. The default GC for OpenJ9 is gencon which is similar to ParallelGC. Not great. In a nutshell its stop-the-world but use multiple threads to make it faster on its stop-the-world collection. OpenJ9 balanced which is supposed to be similar to G1GC literally kneecaps Minecraft. The rest are undesirable policies. The best policy (or only sane one) is gencon but with -Xgc:concurrentScavenge, which unfortunately may not play nicely with spark's gcmonitor command. (It's hit or miss as to whether it's going to break)

What flags should be used then?

-Xgc:concurrentScavenge -XX:+DisableExplicitGC -XX:+UseCompressedOops with possibly -Xaggressive or -Xgc:dynamicBreadthFirstScanOrdering.
If you as the user add in extra flags there's a 90% chance that they won't work. Do not add in more. Do not play with -Xjit. You can check Eclipse documentation which tracks the newest release of OpenJ9. (And ask/test it)

Unfortunately one cannot PR to the wiki nor make changes (reasonable).

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

No branches or pull requests

1 participant