minecraft-optimization icon indicating copy to clipboard operation
minecraft-optimization copied to clipboard

Remove recommendation of the Aikars flags

Open LemmaEOF opened this issue 10 months ago • 13 comments

The Aikars flags are old and outdated. Using them on Java 17 and 21 does users a massive disservice, as they are built around the archaic G1 garbage collector. Shenandoah on Java 17 and Generational ZGC on Java 21 are significantly more performant, with GenZGC providing sub-millisecond maximum GC pauses.

LemmaEOF avatar Apr 24 '24 20:04 LemmaEOF

ZGC is hit or miss depending on the hardware setup. Aikar's flags are a popular standard, because they work good enough for over 90% of servers out of the box without the need of tweaking anything.

YouHaveTrouble avatar Apr 25 '24 09:04 YouHaveTrouble

ZGC is hit-or-miss if it's not generational - GenZGC is excellent pretty much universally. On the other hand, some of the Aikars flags are massive footguns which are liable to make things way less stable.

LemmaEOF avatar Apr 25 '24 17:04 LemmaEOF

Those are bold claims with no evidence provided. Benchmarks would need to be done on most hardware, old and new to even consider changing this.

YouHaveTrouble avatar Apr 25 '24 18:04 YouHaveTrouble

Which is better depends on hardware.

Pantera07 avatar May 01 '24 05:05 Pantera07

Any recommendations on a benchmarking suite to test for this?

brianewell avatar May 05 '24 09:05 brianewell

Not really, as benchmarking minecraft itself is not realistically possible as it's not deterministic enough. You would need similar workload. set amount of operations within x amount of time, just like server ticking.

You would also have to cover insane amount of hardware configurations. from desktop cpus to old xeons, because most people use crappy hosts that provide those old server cpus.

YouHaveTrouble avatar May 05 '24 10:05 YouHaveTrouble

So what evidence would the OP need to provide, as you've requested, to support their claim?

brianewell avatar May 05 '24 10:05 brianewell

You would need similar workload. set amount of operations within x amount of time, just like server ticking.

You would also have to cover insane amount of hardware configurations. from desktop cpus to old xeons, because most people use crappy hosts that provide those old server cpus.

YouHaveTrouble avatar May 05 '24 11:05 YouHaveTrouble

The Aikars flags are old and outdated. Using them on Java 17 and 21 does users a massive disservice, as they are built around the archaic G1 garbage collector. Shenandoah on Java 17 and Generational ZGC on Java 21 are significantly more performant, with GenZGC providing sub-millisecond maximum GC pauses.

I was curious to try this you propose: -XX:+UseZGC -XX:+ZGenerational But in doing so I received the error of Failed to commit memory (Not enough space).

ChrisTVH avatar Jun 16 '24 18:06 ChrisTVH

I was curious to try this you propose: -XX:+UseZGC -XX:+ZGenerational But in doing so I received the error of Failed to commit memory (Not enough space).

I mean you still need -Xmx for maximum RAM allocation. Check noflags.sh for a command builder.

LemmaEOF avatar Jun 16 '24 18:06 LemmaEOF

I was curious to try this you propose: -XX:+UseZGC -XX:+ZGenerational But in doing so I received the error of Failed to commit memory (Not enough space).

I mean you still need -Xmx for maximum RAM allocation. Check noflags.sh for a command builder.

When I set it, it looks like this, since I can only assign flags, but the RAM flags are already defined. image image

ChrisTVH avatar Jun 16 '24 18:06 ChrisTVH

I made it allocate a minimum amount of memory at startup, it will end up using all the RAM when the server loads anyway. Now I will test if it is better than Arkflags with real players and using a configuration based on the recommendations in this guide.

ChrisTVH avatar Jun 16 '24 19:06 ChrisTVH

I've tried it and I've never used something that works so horrible, it generates a lot of server lag. https://spark.lucko.me/1tJhYAxeGu

ChrisTVH avatar Jun 16 '24 19:06 ChrisTVH