Server overloaded, but hardware barely used. #944
Replies: 32 comments 3 replies
-
Should also mention, using the progrium/stress docker container, I can successfully engage all 32threads. |
Beta Was this translation helpful? Give feedback.
-
I'm sorry, I'm not able to help with performance issues. Please report those issues to Mojang since the container ultimately just exec's the java process against the minecraft server jar. My guess is that the minecraft server, like most game engines, is primarily single threaded. As such, it's doesn't matter if you throw 32 cores at it, it's going to max out one of those cores. As such, your findings with progrium/stress indeed confirm the WSL2 VM is making proper use of your hardware; however, those findings don't translate to Mojang's implementation of the minecraft server. You may want to try some of the other image tags, such as |
Beta Was this translation helpful? Give feedback.
-
I found this link: #466 (comment) and tried the activeprocessor count, which initially I thought may be working, but didn't actually solve the issue. For reference, I'm also trying the adopt13 tag, and here is my current docker-compose.
I'm curious what kind of hardware people are running for larger servers? I wouldn't think that a 5 person vanilla server with no mods could max out a core that easily. |
Beta Was this translation helpful? Give feedback.
-
any news on this? did setting cpus help? |
Beta Was this translation helpful? Give feedback.
-
It didn't appear to use any more than 3 cores. One for the main java process, and 1-2 for cleanup and such. I found that my issue was disk I/O. My Ubuntu vhdx was sitting on a platter disc (HDD) to save space on the primary SSD. I ended up tossing in an old 120GB SATA SSD, migrating the WSL installation to that SSD, and then starting up the server (which was running off the /home/user directory within the Ubuntu WSL). That appears to have resolved everything. |
Beta Was this translation helpful? Give feedback.
-
Hmm ok. We just had a horrible server launch with Forge-Server. VPS with 10 cores and 60Gb ram. Ram was barely used (around 15gb) and except one core it the rest was more or less idle... the vps uses an ssd... dedicated hardware is not an option sadly |
Beta Was this translation helpful? Give feedback.
-
What OS is docker running on? |
Beta Was this translation helpful? Give feedback.
-
ubuntu 20.04.2 |
Beta Was this translation helpful? Give feedback.
-
If you want to see my docker-compose/stack (cleaned up):
|
Beta Was this translation helpful? Give feedback.
-
That looks fine. I assume using |
Beta Was this translation helpful? Give feedback.
-
I/O looks fine. Just seems to be a problem with single core usage sadly... |
Beta Was this translation helpful? Give feedback.
-
Is it possible that the initial generation is causing a huge CPU spike, and if you let it idle for a while, it'll calm down? Not sure how powerful the cores on your VPS are. |
Beta Was this translation helpful? Give feedback.
-
Yeah it calmed down but mostly because we lowered the player count (we were aiming for at least 40 player). One core is still more or less non stop at 100% though. I think I will try your example from 23 days ago not sure if it works with forge though but as far as I've seen the latest forge is not required to have java 8 |
Beta Was this translation helpful? Give feedback.
-
I still around 100% once I have a single player on the server. Adding players doens't appear to impact performance, even though CPU usage stays high. I've never had more than 5 players connecting simultaneously, but they were all spread out in different chunks across the overworld/nether, and performance didn't appear impacted. This is an updated version of my docker compose:
|
Beta Was this translation helpful? Give feedback.
-
Ah I see you have no more CPU options. Hmmm. Ok. Thanks anyway. Will have to see what to do |
Beta Was this translation helpful? Give feedback.
-
@benab and @finndo77 please read the comments from #555 (comment) and down. |
Beta Was this translation helpful? Give feedback.
-
FWIW there's been a multitude of open issues on Mojang's official Jira regarding Linux server performance being unacceptable for quite some time now. I personally also ran into this and got quite frustrated at how terribly the server performed. I got around it by moving to the Paper mod which fixed it via their own code in spite of Mojang's lack of movement on the issue. I'm not sure if it's been fixed to date, but just wanted to share my experience if you are seemingly at the end of your rope with this issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks @yllekz . Yes, the latest combo I have heard working best for people, even on RaspberryPi, is |
Beta Was this translation helpful? Give feedback.
-
I'm running an instance in AWS of size m5.xlarge (4 vCPU, 16GB Memory) with the JVM configured to use 8GB of Memory. My small server of 5 people is still seeing some "Can't keep up!" messages resulting in really stuttery mob movement. We haven't truly tested the performance with everyone online a flying around multiple dimensions, but I have a feeling the perfomance won't be great. Judging by some other posts in this thread, we should have no issue supporting 5 people on a server. Does anybody have tips for improving performance? |
Beta Was this translation helpful? Give feedback.
-
@anutting have you tried |
Beta Was this translation helpful? Give feedback.
-
No, I'm running a vanilla 1.17 server. Would that help?
…On Mon, Jun 28, 2021, 10:38 PM Geoff Bourne ***@***.***> wrote:
@anutting <https://github.com/anutting> have you tried TYPE=PAPER or is
that what you're already using ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#744 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFDCIFUF5PVLTFVV2CYF2PDTVEW4HANCNFSM4W7X7CVA>
.
|
Beta Was this translation helpful? Give feedback.
-
Using PAPER fixed all my performance problems as well. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately Paper doesn't seem to have a 1.17.1-rc1 image, Caves and Cliffs with the latest patches and datapack is what I want to checkout. |
Beta Was this translation helpful? Give feedback.
-
I've tried PAPER and it seems to be working with my 1.17 server, however the performance was not any better. Memory and CPU were way too high which resulted in server crashes. Still looking for suggestions on how to increase server stability. I'm using https://github.com/vatertime/minecraft-spot-pricing for reference. |
Beta Was this translation helpful? Give feedback.
-
Unless something changed incredibly recently, Paper doesn't have a 1.17 release yet. They have a GitHub page tracking its development. |
Beta Was this translation helpful? Give feedback.
-
@anutting seems like you need a more powerful instance perhaps? If paper doesn't solve it for you, there isn't much else you can do I think. Paper does a lot to improve performance - which is atrocious on vanilla, unfortunately. |
Beta Was this translation helpful? Give feedback.
-
FYI, I'm going to convert this issue to a discussion because a) it's a great discussion going and b) there's nothing I can do in the image itself to improve performance. |
Beta Was this translation helpful? Give feedback.
-
stupid question, but what did you use to gather your graphs and data like that? Looks very interesting. |
Beta Was this translation helpful? Give feedback.
-
Found this post while looking to optimize two separate Minecraft servers running within K3s cluster. Added these arguments to the
Reference: https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/
Used this on Paper Vanilla 1.20.2 and BMC 2 [Fabric] 1.20.2 both hosted with the |
Beta Was this translation helpful? Give feedback.
-
wow, thought this one was closed out. I was able to resolve all of my performance issues by
I hope some of that helps, at least try some of it for troubleshooting where available (not telling you to spend money if you can resolve it another way) My server on Oracle cloud, has been online since 1.19 snapshots started. I make a clean server for each new major release version, and then clean the map and copy it and player data and achievements over to the new server, so my regular players don't lose their builds or gear, but gain the new version's snapshot functionality and features. Once a month or so I run a storage cleanup and every year I do a map reset of chunks not used much with MCASelector, I do a broad sweep of any chunk not used for more than 5 minutes, and then a second run of any chunk not accessed for 180 days. Here is my docker launch script for the server I am running on Oracle (linux server), followed by my clean up commands I run and my rebuild script. (I know some of the commands are the default settings, but they are there to override any changes that may have occurred)
and this I run every couple of months, sometimes it gives me a good 4GB back in drive space
also, here is my rebuild script (mostly just calls various other little scripts, but has some things that might be useful for anyone), I added some extra comments that are not in the script to explain why I am doing some of the things. I run this on a scheduled task DAILY.
|
Beta Was this translation helpful? Give feedback.
-
Hi there, running a vanilla server in docker.
Windows 10, WSL2 with an ubuntu backend.
HP Z820, Dual-Xeon E5-2680
64GB DDR3 RAM
No other containers runnning.
I'm running into an issue where Windows shows maybe 11% CPU usage, with spikes to 70%, however docker/Vmmem never exceeds ~10% total, but when I go the container stats, I spike from 50-200% CPU usage, and get constant console errors stating:
This only happens when I have 4-5 players connected. I've increased the MEMORY to 4G, and it alleviated the issue when only 3 players were connected, but obviously, I don't want to feed it something like 16GB just so like 6 people can play.
Docker run command was:
docker run -d --init --name=minecraft-vanilla -e EULA=true -v ~/docker/minecraft:/data -p 25565:25565 --restart=always -e TZ=America/Edmonton -e ENABLE_AUTOPAUSE=TRUE -e MEMORY=4G itzg/minecraft-server:latest
Beta Was this translation helpful? Give feedback.
All reactions