author | Luke Hoersten <luke@hoersten.org> |
Wed, 01 Jul 2020 18:52:57 -0500 | |
changeset 109 | 646e4b395cc8 |
parent 108 | f00f45a9512d |
permissions | -rw-r--r-- |
19 | 1 |
[Unit] |
33 | 2 |
Description=PaperMC Server |
3 |
Documentation=https://paper.readthedocs.io/en/latest/server/getting-started.html |
|
19 | 4 |
|
5 |
Wants=network.target |
|
6 |
After=network.target |
|
7 |
||
8 |
[Service] |
|
33 | 9 |
User={{papermc_user}} |
10 |
Group={{papermc_user}} |
|
11 |
WorkingDirectory={{papermc_dir}} |
|
19 | 12 |
Restart=on-failure |
13 |
RestartSec=20 5 |
|
108
f00f45a9512d
Optimized jvm flags for paper.
Luke Hoersten <luke@hoersten.org>
parents:
33
diff
changeset
|
14 |
# ExecStart=/usr/bin/java -Xms{{papermc_mem}} -Xmx{{papermc_mem}} -jar server.jar |
f00f45a9512d
Optimized jvm flags for paper.
Luke Hoersten <luke@hoersten.org>
parents:
33
diff
changeset
|
15 |
# Optimizations from https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/ |
f00f45a9512d
Optimized jvm flags for paper.
Luke Hoersten <luke@hoersten.org>
parents:
33
diff
changeset
|
16 |
ExecStart=/usr/bin/java -Xms{{papermc_mem}} -Xmx{{papermc_mem}} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui |
19 | 17 |
|
18 |
PrivateTmp=true |
|
19 |
ProtectSystem=full |
|
20 |
NoNewPrivileges=true |
|
21 |
PrivateDevices=true |
|
22 |
||
23 |
[Install] |
|
24 |
WantedBy=multi-user.target |