Giter VIP home page Giter VIP logo

hilltty-flags's Introduction

Choose your language

Official translations (last change: 07.08.2021)

Other people's translations (may update with a long delay or not update at all)

You can also make a translation into your language or help with correcting errors in the current

Contact

Join our Discord

Special Thanks

Helped with translation into English

French translation

Polish translation

Spanish translation

German translation

hilltty-flags's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hilltty-flags's Issues

[Suggestion] Compact Heuristics

Preface

Disclaimer: Unlike other types of flags, this one is very server-specific. Results may greatly vary between hardware configurations.

Scenario

I have a VPS, 16GBs of RAM, 6 vCPU and NVMe SSD storage.
Between 5-10 users connected concurrently on the server, that like to spread and explore, mostly alone, between all dimensions.
Forge 1.19.2 server configured with hilltty flags, 10 chunk view distance, and 8 chunk simulation distance.
Tried all kinds of both mods, and flags configurations (GCs, -Xmx, Aikars, etc..), to have stable tps on the server.
So far, Hilltty flags have been the ones to better perform on this environment.

Background

Minecraft is a game that, as versions increase, so do they're object allocation rates.
In my 1.19.2 client, over 50 MBs are being thrown into the heap every second, to be descarded soon after.
This increase affects servers, as well.

ShenandoahGC default heuristic, adaptive, does a good enough job with this allocations, during normal gameplay.
However, once chunkloading starts to happen, it quickly begins to be not enought to free java heap, and heavy GC pauses (>1s) will be present, resulting in rubberbanding, and the infamous "Server can't keep up" and "Player moved too quickly" events spamming your server console.

The solution to this issue, may very well be the compact heuristic.

Flags

To enable compact heuristics:
-XX:ShenandoahGCHeuristics=compact
To select number of GC Threads
-XX:ConcGCThreads=#

Compact heuristic

Unlike adaptative, that tries to have a balance between GC pause time, and amount of GC passes, compact tries to run GC as much as possible.
This results in java heap almost never reaching the maximum capacity, greatly reducing the heavy GC pauses.
As a side effect, max heap can be greatly reduced, due to the more common GC passes.
Example: On my server, memory allocation went tfrom 3.7 GBs, to only 664MBs. *1
It also decreased mspt*2 from 19.9ms, to 13.3ms..
..and completely tanked my chunk loading speed.

Concurrent Garbage Collectors Threads

In my environment, the default behaviour of the JVM is to use as much threads for garbage collection as possible.
This causes Minecraft to have less processing power available, generating processes like chunkloading to lag behind, even if TPS is still in perfect 20.
To fix this issue, you can follow documentation provided on the Shenandoah wiki, to decrease the number of threads used for GC.
1/3 or 1/2 of the available cores should be enough, for most servers.
Example: In my server, I have 2 threads assigned to Concurrent GC, from 6 vCPUs available.

TLDR

Try -XX:ShenandoahGCHeuristics=compact on your server, and tinker with -XX:ConcGCThreads=#
It may do wonders on your server, or completely tank your tps. Testing is the only way to know for sure.

Documentation

https://wiki.openjdk.org/display/shenandoah/Main#Main-Heuristics

Annotations

*1 Value using Spark, with -Xmx flag removed, so JVM can allocate memory as needed
*2 MiliSeconds Per Tick

Erros?

OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.
Error occurred during initialization of VM
Option -XX:+UseShenandoahGC not supported

UseBiasedLocking Is deprecated in Java 15

When starting the server I get

OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.