Receiving bad performance while running Minecraft Spigot inside of a docker container

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.



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation