1

I'm trying to run a 1.8.8 spigot instance out of a docker container and am receiving terrible performance in comparison with just running the instance out of a screen or tmux session.

I've looked across so many places, although I've been unable to find anything useful on the matter. I have no cpu / memory limitations setup on the container, although it still seems like somethings hitting a threshold.

Here's performance with 50 players running in a tmux session: https://prnt.sc/sfuLEVAWpOKf
Here's that same template although this time out of a container: https://prnt.sc/EIp5klbWY4p7

Both of these tests were ran with 0 plugins running on the server and in a mostly voided world.

The only lead I could find on something that could be considered even slightly useful was an article that claimed their were issues running java 8 or 9 with docker due to a mismatch with what cpus java believed to be available. Learning this, I updated the containers to java 10, although still received the same performance hits.

Here's my simple docker file:

FROM java:8
COPY . .
CMD ["bash", "start.sh"]

Here's the start script:

while true
do
    java -Xms512M -Xmx512M -jar spigot.jar
    echo Restarting
    sleep 1
done

Here's the directory of the docker file:
https://prnt.sc/pPXHK8O_-Tnv

This is the docker inspection:
https://pastebin.com/wBWqQKTK

I've been dealing with this issue for almost 24 hours already and am super close to giving up and writing my own solution to deal with this situation, so I would appreciate any help / insight anybody has on this situation!

UPDATE: I've changed the parent image to "openjdk" rather than just "java" and performance seems to of increased. It's still not comparable to what it is running outside of the container, although it's significantly better.

Ashton
  • 11
  • 2
  • Can you do a timings ? Start with `/timings on`, wait few seconds then do `/timings paste` – Elikill58 Apr 14 '22 at 10:50
  • @Elikill58 I’ve ran multiple timings and couldn’t find an issue, should’ve included that in the post. Here’s the timings: https://timings.aikar.co/?id=6ffc55e7d32a4db9911885a69f4bd600 – Ashton Apr 14 '22 at 11:01
  • Firstly you can check for [Aikar flags](https://aikar.co/mcflags.html) that can help you. Also, is that the same map ? It seems to take lot of time to manage hoppers and beacon. Finally, I suggest you to check docker limitation, specially in read/write IO – Elikill58 Apr 14 '22 at 11:08
  • @Elikill58 The exact same server / map / same files, literally the template the docker image is made off of, runs with good performance. Everywhere I looked it claimed there were no default docker limits, although I will keep looking further into that. – Ashton Apr 14 '22 at 11:15

0 Answers0