brucethemoose / Minecraft-Performance-Flags-Benchmarks

Sane, Benchmarked Java Flags and Tweaks for Minecraft
MIT License
1.31k stars 28 forks source link

Question, what are the recommended flags for OpenJ9? #9

Open HyperSoop opened 2 years ago

HyperSoop commented 2 years ago

I am sure it has some things that would help the game a ton, just not in the default configuration.

brucethemoose commented 2 years ago

My tests show it hits server throughput by approximately 40%, and their own description claims its optimized for startup time, not throughput... That's quite a hit to overcome with flag changes.

If you have any suggestions, I'd be happy to test!

HyperSoop commented 2 years ago

My tests show it hits server throughput by approximately 40%, and their own description claims its optimized for startup time, not throughput... That's quite a hit to overcome with flag changes.

If you have any suggestions, I'd be happy to test!

Thing is, it's optimized for low RAM usage. If we could somehow turn the tables and turn the optimization to throughput performance, that would be great

brucethemoose commented 2 years ago

Hmm, there are some interesting flags documented here: https://www.eclipse.org/openj9/docs/x_jvm_commands/

brucethemoose commented 1 year ago

I was recommended these flags for low memory usage, and they seem to do just that: https://gist.github.com/FluffyFoxUwU/69f8f156feefae3d826ad0d15c694002

Phoenix-Starlight commented 1 year ago

Some of the flags are ignored by OpenJ9 or don't work with certain features in OpenJ9. As well, by default, it defaults to the gencon policy which is a throughput collector. Referencing OpenJ9's blog post indicates gencon by itself is similar to ParallelGC which means fps would tank severely due to GC. What would be better is either balanced policy, or gencon with concurrent scavenge. As well, OpenJ9 has adaptive GC threading in the gencon policy, meaning that you should let the VM figure out how many threads to use. The following flags are garbage and will be ignored by OpenJ9:

-XX:InitialTenuringThreshold=n
-XX:InitiatingHeapOccupancyPercent=n
XX:ReservedCodeCacheSize=70M
-XX:G1NewSizePercent=20 
-XX:G1ReservePercent=20
-XX:+OptimizeStringConcat
-XX:+TieredCompilation
TailsFanLOL commented 4 months ago

The gist above returns 404 for me, what were the flags?

TailsFanLOL commented 4 months ago

Nvm, Wayback Machine