Modded server seems to often lag [fabric, prominence II, 1.20.1]
I currently have a long spark report that has recorded the moments where there was more lag. I'll research it myself but I might as well share it here so I can get some extra help (as I'm not very experienced with spark reports) ty :)
116 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 who1ssus#0
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by who1ssus
I'm seeing too long GC collections
Hello, I'm a master at fine tuning MC servers (somehow, Idk but I'm good at it)
Can you send your current startup parameters and a list of plugins/mods you're using?
@1who¡ssus?
-Xms128M -XX:MaxRAMPercentage=80.0 -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -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 -Dterminal.jline=false -Dterminal.ansi=true
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.
Hmm how do I export you a modlist
Just give me a few names of the most resource intensive
Oh look
Check the first logs it tells all mods
What specs are you running on?
i9 9900k
Not very strong ;-;
It's more than enough
Did you see the spark log?
Yes
How much memory do you have?
8 GiB, allocates 80%
So xmx in theory is around 6,4 GB
Is this shared hosting or your own Dedi/VPS?
Shared
Okay, Please add this to your startup parameters:
-Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
Should look like this:
This will start a file in the root of your server directory called gc.log
Let your server run for an hour and then send me that log 🙂
We will then begin to tune your garbage collector to make this all run smoother
@1who¡ssus?Mhm okay
Does it needs the server to be lagging?
Nope, just let it run normally
If it lags it lags
Okay I'll come back with results
Thanks!
Any update? @1who¡ssus?
Hello, I have to wait for the host owner to change these flags for me, but I might eventually get full flags access
Okay
Just got the logger up 👍
Will check back in 1h
Great
Thanks!
If you find cool stuff let me know ✨
@1who¡ssus?
Took a bit, sorry.
Here are some updated startup parameters, let the server run for another hour and send me the new
gc.log
that gets generated.
Your young GC processes are pausing too much, so we are optimizing it to be more memory efficient and to pause for less time - cleaning more memory. We also allowed more flexibility to heap use and increased the region to be able to use larger allocations more efficientlyOkay
Just saying I've got a player at panel and I don't really wanna kick him out but he says he'll play all night 😢😢😢😢 the server autorestarts anyways so I'll be able to get logs soon
No worries
Is it bad if log files are more than 1 hour?
Also should I test java 21 over 17?
No, just gets bigger
Yes, what?
Of course use the latest Java your MC version works with
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by who1ssus
This is more optimized for heap and pause times on the GC.
@1who¡ssus?
Okay
They have an issue
Hmmm
Take that one out for now
Uhh I'll get logs in an hour
How's it looking now?
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by who1ssus
@Jared | InfraCharm found something weird? I do believe your changes have indeed helped with the server performance
Just wanna thanks you for the help, what where the sources you used to tune this stuff?
Ah, didn't see this
@1who¡ssus?
Just understanding how the garbage collector works, that's all 🙂
R you sure this flag will work? The one that broke before
.
Btw can testing on another machine alter the result?
Yes, it will alter the result.
I took out the broken parameter and made a couple other changes to makeup for it being deleted
Garbage Collection and some of the other optimizations here rely on the CPU and memory of the system - any changes to those will alter the result
my fabric server doesnt lag, but floats around the 40-45 mspt mark most of the time. can i use these flags on my server and see performance boosts? its 1.20.4 fabric, around 300 mods
The GC optimizations I do are system specific - you may not see the same improvements that they see. You are welcome to try it though
oh yeah that makes sense mb 😂
more textt
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by who1ssus
Looking a lot better
So this is the conclusion?
I also can't use alwayspretouch kekw
Oh I'm silly I didn't saw the xlog
So I thought you forgot them or concluded the flags lol
G1rset is also broken
@Jared | InfraCharm can you check my wonders for a sec :hypershiggy:
You can take the broken ones out
Will let you know when I send them into the console
Do you also wanna check my client flags? ✨
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by who1ssus
Yo @Jared | InfraCharm are you here?
I'm here. I'm not doing the client - sorry!
Oh it's not client logs
These are from the last flags you gave me & from the server
It's ok don't worry
This is showing different specs
Wut
Hmm
Just downloaded this, 100% from my instance
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by who1ssus
@Jared | InfraCharm these logs are 100% grabbed from the instance I've been working in this since day 1. I've noticed some successful improvements so thanks you for taking your time 🙂 how are these logs?
Like we jumped from frequent server is going 2000ms behind to stable 18-20 tps constant
Is it? I'll take a look but the CPU and Memory looks different
Hmmm
8203 mb, 16 cores CPU with 4 available
what cpu
i9 9900k
also like
8203mb is so specific 😭
enviro?
Nah FPS
ah
if you’re having lag issues make a spark
Yeah I made a while but after tweaking akair flags with jared it has helped
I had slow old GC collections
Tada
Spark report prior to optimizations
make another with the optimisations if you want to see if you can improve lag more
Yeah I should wait for a day I get many players together
@1who¡ssus? I think this is the last optimization we can do, you are running super efficiently at this point and I'm not sure these new startup parameters will even make a difference but it's worth a shot 🙂
Do these jvm flags strongly depend on server software?
Or could i use It in the future for forge for example?
They can sometimes, even depend on the version
No, I would optimize everything seperately as they run differently. These are meant for your specific server on your specific hardware to make it run more efficiently
Hmm these instances will surely only change between forge and fabric 1.19+
Hmm okay
I should get into this stuff too
My full system administration course is only $899
//joke
owo
i mean offering some kind of guide on how you learn this would be kind of cool
I've been annoying the FPS owner with the jvm flags 🤣 but hey he's contributing to science
love caner
Big science contributor allowing me to change my jvm flags so often
He's gonna allow admins to edit jvm flags in all servers so I'll be able to make more science
I'm trying to figure out a good price point for a per-server GC optimization
:Gladge:
This is like psychoanalysis but for jvm flags ✨✨
$5 per server seems reasonable
Was thinking that price
I'd buy 💅
I just wish to test once with many more players
At least 3 or 4 moving around
If it performs fine then the jvm flags fixed the stuff
As we'd have 7 tps drops when exploring
With a pregen world
ill join
You wanna install the modpack? ✨
oof
I mean it's not that I'll pack you malware in a jar 🤣
I have forked prominence II into my own custom thing so I have it on drive & share the modpack with friends
But I can understand not wanting to risk with internet strangers
so the custom mobs come to life and walk around on my desktop saying "Join the server NOW!"
Lol
I don't understand what that means but yea
imagine not making your own custom pack smh
Ywah
Like
Modpacks always have stuff I don't like so I change it
It's a headache but yea
Yeah we ended up making ours from scratch
Ooo
Vouch ❤️
I've got more science @Jared | InfraCharm
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
gc.log
Requested by who1ssus
O no
What’s this for
Logs? Or did we finished?
Because your last flags still had logger
I can take a look in a bit
but you’re as optimized as can be at this point
Oka
If you find nothing else to improve tell me and I'll remove the logger from my current flags
@Jared | InfraCharm we conclude no?
I haven't gotten to this yet
!close
post closed!
The post/thread has been closed!
Requested by who1ssus#0
I'll be closing this thread, won't annoy you anymore just for small optimizations after all the hellp I've got , I believe you did a good job and it seems to have helped out a lot. Very grateful for taking your time with me 🙂