URGENT: Random, occasional server slowdown
(Java, 1.20.1, Forge)
Hello,
I have been having an issue where the game ends up creating lag at some random point in time during the run. Upon restart, it is resolved but it keeps happening and I am at my wit's end on how to resolve the issue.
I would be very grateful if I could get some support on this.
https://spark.lucko.me/8alxMmY5d2
Thanks in advance!
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
48 Replies
📋 Spark profile attached:
are you using a host?
if so whos ur host, and how much ram are you paying for
9GB on Pebblehost
we upgraded last week and it was fine for a week
you are able to edit the startup flags yeah?
but the last few days it's been struggling
I am new to hosting, what do you mean by this?
-Xmx9000M -Xms128M -XX:MaxDirectMemorySize=256M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0
this stuff
I guess so
I gotta find it
wait I am gonna add a co-host who is better with that
!aikar
Garbage Collection is an important aspect of Java
Usually you'll want to fine-tune your server's GC to maximize efficiency but minimize the negative effects (e.g. stuttering).
The baseline recommendation is to use G1GC, you should follow aikar's recommendations (a Paper core dev) on how to tweak it.
For contemporary java versions, there's also ShenandoahGC with even shorter pauses and smaller CPU overhead, hilltty's flagset is the usually recommended.
If you feel adventurous, you can also try out the latest of the three, ZGC. It is not yet spread wide, actually digging up a reference was somewhat hard.
If you want to read a general overview of Java GCs, there's this one in the making.
Admincraft Canned Responses
use these flags ^
they might fix ur issue
I'll give it a try, cheers!
that's very clearly a mod with a memory leak
start a profile with
/spark profiler start --alloc
and share the link. It should hopefully show the mod with a memory leakCheers! I was expecting some memory leak
turns out we already tried this one out
yeah, the spark profiler command I said should really easily show the mod
gc being active like 90% of the time isn't normal :KEK:
gc`?
garbage collection, it's the way java (and other languages) free memory that's no longer used
normally you shouldn't even see GC_active here at all

I understand
I was expecting some mod to shit itself because otherwise a server restart wouldnt be able to fix it
and by god I shall smite that mod once the server shits itself again
https://spark.lucko.me/wafXLvehAx
So this is the one I ran for 5 minutes approx
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
📋 Spark profile attached:
it was during peak lag
Is it better chunk loading causing the memory leak?
could be
it’s a datapack that runs commands causing it
So we have only one datapack, I will attempt to delete this

We also deleted betterchunkloading and the problem delayed but still happened
Also, how were you able to tell that it was a datapack? I'd like to learn to read that
https://spark.lucko.me/ww0k9sAQBC
The issue still persists
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
📋 Spark profile attached:
allocation for 5 minutes
use this method to generate a profile.txt and send it here
https://docs.bloom.host/datapacks/#disclaimer
like this?
I was exploring on a boat from the small ships mod, traversing the ocean and some continents
Are my eyes deceiving me??
It's dynamic lights????
incendium and/or dynamic lights
it's very weird for incendium to work while I am the only player and on the overworld
yeah honestly, just use a client side dynamic lights mod instead of whatever that dynamic lights thing is
CurseForge
Sodium/Embeddium Dynamic Lights
Multiloader port of LambDynLights that adds Sodium/Embeddium settings support
28.1M Downloads | Mods
yeah we did that yesterday
Server ran considerably better
now it crashed again, I shall investigate now
latest lag
To me it looks like the server simply hit the memory capacity of the plan as the reporting above seems normal, or am I wrong?
By the way, thank you guys for your support.
This has been immensly helpful. I wish I could return the favor.
I’d have to see both a normal spark report (and possibly an alloc spark report) to see what’s going on tbh
okay, will do
once it happens again
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
📋 Spark profile attached:
So yeah I have this going on rn
I guess it's really just the server being overwhelmed with chunk loading
this one shows an issue with flowing water
and still some datapack stuff (if possible, I'd personally remove all datapacks that you can easily replace with mods)
thing is, we only have mods
There was one datapack which was only about better end cities
and I removed that
Or is there a datapack I mistook as a mod?... I mean my datapack folder is empty
apparently datapacks can be packaged as a mod (ie: incendium)
Oh damn
I guess I'll look each one of them
@Not_A
It turned out to be the aether mod, thanks a lot!
@Snow Kit