ME1312 / SubServers-2

SubServers – The Minecraft Server Management Platform
Apache License 2.0
91 stars 23 forks source link

Heap / Threads Management #37

Closed xXSchrandXx closed 5 years ago

xXSchrandXx commented 5 years ago

What Should Be Added

How does SubServer Manage the Heap / Threads? Example: If I start like this java -Xms$MINRAM -Xmx$MAXRAM -Dfile.encoding=UTF-8 -jar SubServers.Bungee.jar does SubServer automaticly manage the RAM of the SubServers?

If SubServer doesn't do this, how would be a Information for the Java parameters or maybe a automatical heap / thread manage with the following parameters?

Why It Should be Added

These Java Parameter could help the performance of the server / the performance fof the Player.

-server
-XX:+UseG1GC
-XX:ParallelGCThreads=$THREADS and -XX:ConcGCThreads=$THREADS
-XX:G1HeapRegionSize=$HEAPSIZE
-XX:MaxGCPauseMillis=$MILLIS and -XX:MaxGCMinorPauseMillis=$MILLIS
-XX:SoftRefLRUPolicyMSPerMB=$MSPerMB
-XX:SurvivorRatio=$RATIO and -XX:+NeverTenure
-XX:+DisableExplicitGC
And Maybe: -XX:UseSSE=3 -oss4M -ss4M -XX:+AggressiveOpts

What's The Alternative

You could add them as Configurations or you could add them in your wiki.

ME1312 commented 5 years ago

The server manager manages the servers as individual processes, which is not nearly in-depth enough to do things like manage threads or JVM memory. Additionally, subservers themselves request memory from the system directly, so giving more ram to the server manager doesn't do anything.

As for the per-server startup options, you just kind of have to use what works for you. Unfortunately, many options like these cannot make it into the default config for compatibility reasons, however nothing is stopping you from editing the templates and adding them yourself. As for which ones give you the best performance, I'm not sure. That question is better suited on the spigot forum.

xXSchrandXx commented 5 years ago

So a -Xms$MINRAM -Xmx$MAXRAM in the Executable could be useful for some servers, but adding it by default (as a template option) is not going into the plugin.

I don't realy know eigther if the others can help.

ME1312 commented 5 years ago

Closing this one for now.