Oracle: Why is lag from Minecraft server persisting after server is turned off for multiple hours?
So I use Oracle Cloud Free Tier to host my server currently. My VM has 4 Ocpu and 20 GB of ram. I always allocate 16 or lower to my Minecraft server.
Normally I use Java 19 with the G1GC garbage collector (Aikar's flags).
I want to instead use Java 23 with generational ZGC as my garbage collector.
But for some reason... Every time I run my Minecraft server with ZGC, it's really really speedy and responsive. Until a few hours later it starts slowing down and I start getting messages about watchdog (server taking too long to tick/respond).
So I close the Minecraft server, and restart my VM. But things are not back to normal.
For the next few hours (sometimes days), whether I open the Minecraft server or not, no matter how many times I restart the VM, the VM will remain comedically slow and laggy. The simple act of logging into the VM will take MINUTES instead of fractions of a second. Unzipping a file? Good luck. I can barely even stay connected to the VM.
The only way to fix it is to wait a day or two (it will get fixed even if I don't restart the VM).
Note: Java 19 with G1GC never causes this issue.
Why does this happen?
Is this just a quirk of Oracle Cloud? Does something about ZGC make Oracle decide to limit my CPU power? Or is my VM just haunted?
17 Replies
well just use g1gc. g1gc has been proven to be stable and mostly efficient for mc servers
You are fixing a problem that doesn't exist
Ah, ok, I was not aware that ZGC was unstable. It works without any problems at all when I use it on client, and I haven't seen any reports of it doing weird stuff anywhere.
But are you sure it's not something related to the VM or Oracle in this instance? The lag persists after I stop java and restart the VM.
Let's just call it hit or miss, only because some ZGC flags work on some specs doesn't mean that they'll work somewhere else
Have you ever heard of this happening? The entire machine becoming slower even after java is stopped and the machine is restarted?
I still kind of want to know what's going on with that and why it's happening.
why not lts
dont use non lts
What do you mean?
java 19 and 23 arent exactly good versions
use 21 or 24
well 17, 21 or 24
we also need a spark report
I'm using Purpur 1.19.4, which can enable SIMD on Java 17, Java 18, and Java 19. SIMD helps performance a ton.
But I wanted to use a new version of Java, and it seems that the latest version of Java that is supported by ViaVersion is 23. Seeing as how I would be lacking SIMD, I wanted to see if I could get any improvements from ZGC.
So yeah that was basically my whole thought process
And yeah I know things would be easier if I could just update my entire server, but a lot of plugins ended development at exactly 1.19.4 π
I'll see if I can find one of the ones I took
I've had the server off ZGC for a few days
simd is for very specific use cases
map rendering
18 19 are non lts, no security updates, nothing
17 is still supported, is what plugins and mc etc are built against etc
Interesting
SIMD does nothing but map rendering?
exactly
Ah ok
its performance improvement comes from pufferfish
its for image on maps type of plugins
I'll have to look into why 19 is faster for me then
I had assumed it was SIMD support
use proper sparks to actually find whats causing your performance issues
I think I found some reports from when I was trying ZGC
https://spark.lucko.me/SoMTs0Iay8
https://spark.lucko.me/Dlxz5bGtvf
https://spark.lucko.me/J98WncPwQI
It's not a lot to go off of, but you have to keep in mind i was literally getting disconnected every 5 seconds and if I kept the server up too long the entire VM would become unresponsive so I had no way to do a 20+ minute long report
What I noticed durring this time is that the server would constantly say it wasn't responding for long periods of time, and the Spark reports almost never reflected this.
I've generally found that java 21 is fine in most cases