mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 15:36:22 +00:00
Auto-merging via docker-versions-create
This commit is contained in:
@@ -17,4 +17,9 @@ workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- minecraft_server
|
||||
- minecraft_server:
|
||||
filters:
|
||||
branches:
|
||||
ignore:
|
||||
- armv7
|
||||
- multiarch
|
||||
|
||||
@@ -1048,6 +1048,12 @@ To enable remote JMX, such as for profiling with VisualVM or JMC, add the enviro
|
||||
|
||||
-e ENABLE_JMX=true -p 7091:7091
|
||||
|
||||
### Enable Aikar's Flags
|
||||
|
||||
[Aikar has does some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. The set of flags documented there can be added using
|
||||
|
||||
-e USE_AIKAR_FLAGS=true
|
||||
|
||||
### HTTP Proxy
|
||||
|
||||
You may configure the use of an HTTP/HTTPS proxy by passing the proxy's URL via the `PROXY`
|
||||
|
||||
@@ -43,7 +43,7 @@ fi
|
||||
log "Checking for JSON files."
|
||||
JSON_FILES=$(find . -maxdepth 1 -name '*.json')
|
||||
for j in $JSON_FILES; do
|
||||
if [[ $(cat $j | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') == "" ]]; then
|
||||
if [[ $(cat "$j" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') == "" ]]; then
|
||||
log "Fixing JSON $j"
|
||||
echo '[]' > $j
|
||||
fi
|
||||
@@ -61,7 +61,7 @@ fi
|
||||
for c in /config/*
|
||||
do
|
||||
if [ -f "$c" ]; then
|
||||
log Copying configuration `basename "$c"`
|
||||
log Copying configuration $(basename "$c")
|
||||
cp -rf "$c" /data/config
|
||||
fi
|
||||
done
|
||||
@@ -132,6 +132,31 @@ if isTrue ${ENABLE_JMX}; then
|
||||
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
|
||||
fi
|
||||
|
||||
if isTrue ${USE_AIKAR_FLAGS}; then
|
||||
# From https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/
|
||||
JVM_OPTS="${JVM_XX_OPTS}
|
||||
-XX:+UseG1GC -XX:+ParallelRefProcEnabled
|
||||
-XX:MaxGCPauseMillis=200
|
||||
-XX:+UnlockExperimentalVMOptions
|
||||
-XX:+DisableExplicitGC
|
||||
-XX:-OmitStackTraceInFastThrow
|
||||
-XX:+AlwaysPreTouch
|
||||
-XX:G1NewSizePercent=30
|
||||
-XX:G1MaxNewSizePercent=40
|
||||
-XX:G1HeapRegionSize=8M
|
||||
-XX:G1ReservePercent=20
|
||||
-XX:G1HeapWastePercent=5
|
||||
-XX:G1MixedGCCountTarget=8
|
||||
-XX:InitiatingHeapOccupancyPercent=15
|
||||
-XX:G1MixedGCLiveThresholdPercent=90
|
||||
-XX:G1RSetUpdatingPauseTimePercent=5
|
||||
-XX:SurvivorRatio=32
|
||||
-XX:MaxTenuringThreshold=1
|
||||
-Dusing.aikars.flags=true
|
||||
-Daikars.new.flags=true
|
||||
"
|
||||
fi
|
||||
|
||||
mcServerRunnerArgs="--stop-duration 60s"
|
||||
|
||||
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user