diff --git a/README.md b/README.md index 937f511..00f92a0 100644 --- a/README.md +++ b/README.md @@ -41,20 +41,20 @@ server address already filled in. ## Memory -The heap defaults to 13 GB (`-X`/`-x` to change it). `-XX:+AlwaysPreTouch` means -the JVM commits the whole heap at startup rather than growing into it. +The heap defaults to 10 GB (`-X`/`-x` to change it). `-XX:+AlwaysPreTouch` means +the JVM commits the whole heap at startup rather than growing into it, so the +number you set is the number actually taken. -On a ZFS host, cap the ARC before running a heap this large — ZFS defaults to -using up to half of RAM for cache, which will fight the JVM for the same pages: +On a ZFS host, cap the ARC to go with it — ZFS defaults to using up to half of +RAM for cache, and will otherwise contend with the JVM for the same pages: ```bash echo "options zfs zfs_arc_max=2147483648" | sudo tee /etc/modprobe.d/zfs.conf sudo dracut --force && sudo reboot ``` -That pins the ARC to 2 GB. On a 16 GB box, 13 GB heap + 2 GB ARC leaves ~1 GB -for everything else, which is tight — drop the heap to 10–11 GB if the host -does anything besides run the server. +That pins the ARC to 2 GB. On a 16 GB box that leaves roughly 4 GB for the OS +and anything else the host runs, which is comfortable. ## Requirements diff --git a/deploy.sh b/deploy.sh index 9a38d8f..a2167e4 100755 --- a/deploy.sh +++ b/deploy.sh @@ -14,7 +14,7 @@ set -euo pipefail NAME=""; AUTHOR=""; BASEURL=""; NFVER="latest"; MCVER="1.21.1" -SHARE="/minecraft"; XMX="13G"; XMS="13G"; ACCEPT_EULA="" +SHARE="/minecraft"; XMX="10G"; XMS="10G"; ACCEPT_EULA="" HERE="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" die() { echo "error: $*" >&2; exit 1; } diff --git a/mc-service-setup.sh b/mc-service-setup.sh index a711286..d7e8cc2 100755 --- a/mc-service-setup.sh +++ b/mc-service-setup.sh @@ -18,8 +18,8 @@ set -euo pipefail SHARE="/minecraft" MCUSER="minecraft" -XMS="13G" -XMX="13G" +XMS="10G" +XMX="10G" NFVER="" # version, or "latest" to resolve one; empty = don't install MCVER="1.21.1" # only used to pick the matching NeoForge series ADMIN="" # human user who authors the pack on the share