Slow Chunk Loading
Hello! I have a problem when I host a 1.18+ Minecraft server in Oracle Cloud. The chunks load so slowly that it makes it unplayable. This does not happen in 1.17.1 and below.
The machine is hosted in Vinhedo, Brazil. That happens even without plugins, with the default PaperMC configurations. That didn't use to happen in 1.18+ some time ago, but now it does. I allocated 24 gigabytes of RAM to Java, which is GraalVM JDK 20, installed with SDKMAN.
36 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by Magnetizado#1229
I have the basic Ampere ARM VM, with 4 cores and 24 GB of RAM
These are my flags: java -Xms1024M -Xmx24576M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar server.jar
Aikar's Thoughts
JVM Tuning: Optimized G1GC for Minecraft - Aikar's Thoughts
Learn more about my In depth study on tuning the G1GC garbage collector to be optimized for how Minecraft servers run, and keep low pause efficient usage.
If it is relevant, the VM is running under Ubuntu 22.04
Pre generate the chunks with Chunky
!chunky
Plugin: Chunky
Chunky is a plugin that will load chunks in a defined radius into server memory, making it easier, and less performance impacting on your server when a player loads those chunks.
If you've setup a worldborder, start with by typing
/chunky worldborder
. Otherwise, you can set a radius using /chunky radius #
. Then run /chunky start
.
It is a good idea to let this run with no players online. If your server does crash, just start it back up and /chunky resume
and it should pick back up where it left off.
Once it tells you that the task is finished, you may remove the chunky plugin folder and the Chunky .jar from your server.Admincraft Canned Responses
Yeah, I know that, but it is strangely slow.
It didn't use to be like that.
Generate the chunks first 👍
It wasn't that slow while generating chunks, that is the problem.
It was way faster than how it is now.
I'm not sure what the hold up is. The older a map gets the more active the map becomes. Mob farms get made, more AI gets added into the game. The map and game generally becomes more difficult to run as it matures.
Yeah, but that map was created around 5 minutes ago.
Why wouldn't you do the thing that is the hardest for the server to do, first.
the game gets harder to run.1.20 takes more resources to run compared to 1.17
I am running in 1.19.4. I remember the last time I hosted in 1.19.4, it was way faster.
The map is new, from 5 minutes ago.
don't know a lot about actually running on the free tier, but wondering if there's some external bottleneck
Unless you have hard numbers, I'm not looking to debate this.
Chunk generation is the hardest thing for a server to do
:FrogeBIGEYES:
Yeah, but it was faster, now it's like a snail.
What do you mean by external bottleneck?
tbh, I would pregen then wait a bit for things to become stable. there's still some population stuff that happens when a chunk is very new and when a player comes around
if it's still performing like ass, then start troubleshooting.
That looks like a large view distance and you're flying very fast in creative mode.
spark, system CPU/disk, etc
Yeah, but it wasn't that slow,
also you don't need 24GB of memory
The TPS is always 20.
MSPT is very low.
Around 5-10.
Are ARM cpus powerful enough to handle fast chunk loading?
also, being honest here, if you tell people "it's slow now and it wasn't before", you're unlikely to get support. we can't act on feel.
and why are you running ARM for that matter?
Chunky running on OCI gets on average 30 CPS on paper with no players on.
Arm is free with oracle
Your video looks like 30 CPS.
Because the other VM that is not ARM has only 1 core.
and 1 gigabyte.
They mean an AMD VM with 1 vCore and 1 (or 4, I forget) gb of ram
It is only 1 gb.
Ah, well generally chunk loading relies heavily on the server CPU, and ARM isn’t generally recognized to be a very powerful processing family
Use Chunky dev build
Free and gives a pretty massive speed boost
Too much ram, use 12GB max but try to use as little as possible, also make XMX and XMS the same. Also use Java 17
he's giving mc more ram than he has in total lol
True
Just fixed it. Apparently, the problem is the same that occurs with a singleplayer world in Vanilla Minecraft with 1.19+. I just downloaded the Fabric server jar and put C2ME into it, and it fixed the problem completely.