0

I am trying to get my minecraft server to run on startup on Ubuntu 16.04 with a systemd service. The service I created works, but it uses excessively high CPU usage. If I run the minecraft server by itself it usually sits in the single digits for CPU usage. When I run it through the service it sits at 100% constantly. Is there a way I can fix this?

Link I used to make service: here

systemd .service file

[Unit]
Description=Minecraft Server

[Service]
WorkingDirectory=/home/minecraft/world
User=user
Group=user
Restart=on-failure
RestartSec=20 5
ExecStart=java -jar spigot-1.9.4.jar nogui

[Install]
WantedBy=multi-user.target

Output:

user@server:~$ systemctl status minecraft-server.service
● minecraft-server.service - Minecraft Server
   Loaded: loaded (/etc/systemd/system/minecraft-server.service; disabled; vendor preset: enabled)
   Active: active (running) since Sat 2017-03-25 21:38:41 EDT; 11s ago
 Main PID: 3337 (java)
   CGroup: /system.slice/minecraft-server.service
           └─3337 /usr/bin/java -jar spigot-1.9.4.jar nogui

Mar 25 21:38:47 Server java[3337]: [21:38:47 INFO]: Zombie Aggressive Towards Villager: true
Mar 25 21:38:47 Server java[3337]: [21:38:47 INFO]: Experience Merge Radius: 3.0
Mar 25 21:38:47 Server java[3337]: [21:38:47 INFO]: Preparing start region for level 0 (Seed: -2292665518101882972)
Mar 25 21:38:48 Server java[3337]: [21:38:48 INFO]: Preparing spawn area: 58%
Mar 25 21:38:49 Server java[3337]: [21:38:49 INFO]: Preparing start region for level 1 (Seed: -2292665518101882972)
Mar 25 21:38:49 Server java[3337]: [21:38:49 INFO]: [WorldEdit] Enabling WorldEdit v6.1.3;7a097ca
Mar 25 21:38:49 Server java[3337]: [21:38:49 INFO]: WEPIF: Using the Bukkit Permissions API.
Mar 25 21:38:50 Server java[3337]: [21:38:50 INFO]: [WorldEdit] Using com.sk89q.worldedit.bukkit.adapter.impl.Spigot_v1_9_R2 as the Bukkit ada
Mar 25 21:38:50 Server java[3337]: [21:38:50 INFO]: Server permissions file permissions.yml is empty, ignoring it
Mar 25 21:38:50 Server java[3337]: [21:38:50 INFO]: Done (3.139s)! For help, type "help" or "?"
lines 1-17/17 (END)

1 Answer 1

2

Adding --noconsole solved my problem. Found the answer here: https://www.spigotmc.org/threads/high-cpu-usage-solved.87634/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .