A
Admincraftβ€’5mo ago
Element

Help diagnosing lag issues

Hello again πŸ™‚ I'm just wondering if anyone can have a once-over my spark profile and help direct me to what's causing some of the lag issues that we're currently having? https://spark.lucko.me/VvyQTYslTw
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
69 Replies
Admincraft Meta
Admincraft Metaβ€’5mo ago
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
❌ Low Memory
Allocate at least 6-10GB of ram to your server if you can afford it.
❌ Threads
You only have 2 thread(s).
❌ chunk-gc.period-in-ticks
Decrease this in bukkit.yml. Recommended: 400.
❌ ticks-per.monster-spawns
Increase this in bukkit.yml. Recommended: 4.
❌ spawn-limits.monsters
Decrease this in bukkit.yml. Recommended: 15.
❌ spawn-limits.water-ambient
Decrease this in bukkit.yml. Recommended: 5.
❌ spawn-limits.ambient
Decrease this in bukkit.yml. Recommended: 1.
❌ spawn-limits.animals
Decrease this in bukkit.yml. Recommended: 5.
❌ entity-activation-range.animals
Decrease this in spigot.yml. Recommended: 16.
❌ entity-activation-range.monsters
Decrease this in spigot.yml. Recommended: 16.
❌ entity-activation-range.misc
Decrease this in spigot.yml. Recommended: 12.
❌ entity-activation-range.water
Decrease this in spigot.yml. Recommended: 12.
Plus 36 more recommendations
Click the buttons below to see more
Requested by element3329 β€’ Page 1 of 4
Admincraft Meta
Admincraft Metaβ€’5mo ago
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 element3329#0
Skullians
Skulliansβ€’5mo ago
Your GC is crumbling hard @Jared | InfraCharm :stare:
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
Get. Me. A. GC. Log. Before. Pinging. Me.
Skullians
Skulliansβ€’5mo ago
aw fuck it’s 11pm sorry Add this to your startup flags: -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M It will generate a gc.log file. Run your server for 15 minutes along with a new spark report. When the 15 minutes are over, send me: * gc.log * Spark Report * Startup Parameters * System Specs * Ptero Container Specs @Element
Element
ElementOPβ€’5mo ago
Sure I will do πŸ™‚ I've just added this to the end of my startup flags Then restart my server, 15 minutes later stop it to get the logs?
Skullians
Skulliansβ€’5mo ago
Make sure it’s before the -jar part yup! You don’t have to stop the server, just send over the log, spark and specs listed above
Element
ElementOPβ€’5mo ago
I don't think I have a -jar part on my flags -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -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 There are my startup flags
Skullians
Skulliansβ€’5mo ago
oh, just chuck the gc log flags anywhere in there
Element
ElementOPβ€’5mo ago
Sure 15 mins time it'll be here πŸ™‚ Hmm. For some reason the flags I'm setting are once again not applying I'm gonna need to speak to my host provider again Because I'm not able to generate the gc log while the flag doesn't appyl
Skullians
Skulliansβ€’5mo ago
are you able to view your flags? It’s possible they’re resetting because you might have pasted it in wrong Not sure how your host handles it
Element
ElementOPβ€’5mo ago
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -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 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
This is what's supposed to apply
-Xmx4100M -Xms128M -XX:MaxDirectMemorySize=900M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0 -Dterminal.jline=false -Dterminal.ansi=true -Dheap900 -Did=813641 -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -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
And this is what's showing on the spark report
Skullians
Skulliansβ€’5mo ago
You are restarting your server right? Try stop your server first, apply the flags and then start
Element
ElementOPβ€’5mo ago
I'll try that I previously had applied them, then hit the restart button
Skullians
Skulliansβ€’5mo ago
yeah just trying different stuff
Element
ElementOPβ€’5mo ago
Yeah, same thing, doesn't apply the new ones I'll speak to my server host. They had to manually set the flags I've got now because I had this problem before
Skullians
Skulliansβ€’5mo ago
ah, unfortunate
Element
ElementOPβ€’5mo ago
Hey @Skullians πŸ™‚ I finally got a response from the host and they've got the flags applied properly. Here's the GC log attached Startup flags are:
-Xmx4100M -Xms128M -XX:MaxDirectMemorySize=900M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0 -Dterminal.jline=false -Dterminal.ansi=true -Dheap900 -Did=813641 -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -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 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
I'm not sure how to get the Ptero container specs, but I've just done a 5 minute Spark report as well https://spark.lucko.me/pNb531I1Qy
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’5mo ago
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
Requested by element3329
Admincraft Meta
Admincraft Metaβ€’5mo ago
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
βœ… Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by element3329 β€’ Page 1 of 4
Skullians
Skulliansβ€’5mo ago
how much ram do you have (what plan did you choose)
Element
ElementOPβ€’5mo ago
I'm paying for 5GB on their premium plan
Skullians
Skulliansβ€’5mo ago
@Jared | InfraCharm 5gb, 2 threads of a ryzen 9 7900
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
-Xmx4100M -Xms128M -XX:MaxDirectMemorySize=900M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0 -Dterminal.jline=false -Dterminal.ansi=true -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
-Xmx4100M -Xms128M -XX:MaxDirectMemorySize=900M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0 -Dterminal.jline=false -Dterminal.ansi=true -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
If a flag does not work (your server doesn't start), go ahead and remove the flag and let me know which one it was. Go ahead and run a new spark report for 30 minutes. @Element
Element
ElementOPβ€’5mo ago
I will do πŸ™‚ might take a while for results because there's a good chance I'll have to go back to my server host to have them apply the flags first My startup says these flags can't apply -Xmx4100M -Xms128M -XX:MaxDirectMemorySize -XX:MaxMetaspaceSize -XX:MaxRAMPercentage -Dterminal.jline -Dterminal.ansi Should I change them at all? I think I can get them applied if I ask my server host directly to apply them
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
You can skip those ones
Element
ElementOPβ€’5mo ago
--Xmx4100M -Xms128M -XX:MaxDirectMemorySize=900M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0 -Dterminal.jline=false -Dterminal.ansi=true -Dheap900 -Did=813641 -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
--Xmx4100M -Xms128M -XX:MaxDirectMemorySize=900M -XX:MaxMetaspaceSize=1024M -XX:MaxRAMPercentage=90.0 -Dterminal.jline=false -Dterminal.ansi=true -Dheap900 -Did=813641 -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
This is what I got from my spark report, is it okay?
Element
ElementOPβ€’5mo ago
https://spark.lucko.me/LzdfcS0BIC Okay here's the 30min profile
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’5mo ago
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
βœ… Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by element3329 β€’ Page 1 of 4
Element
ElementOPβ€’5mo ago
@Jared | InfraCharm I hope you don't mind the ping, is the above okay? No rush if you're busy
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
Ah let me look! Can you send the new gc.log too? Look at the timestamp to see which the most current is
Element
ElementOPβ€’5mo ago
Element
ElementOPβ€’5mo ago
Here you are
Admincraft Meta
Admincraft Metaβ€’5mo ago
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
Requested by element3329
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=100 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch
-XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=30 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4
-XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=1 -XX:SurvivorRatio=32
-XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=100 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch
-XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=30 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4
-XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=1 -XX:SurvivorRatio=32
-XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
Try these, same instructions as earlier! @Eternal
Element
ElementOPβ€’5mo ago
Sure, I'm gonna go to sleep but I will udpate in the morning πŸ™‚
Element
ElementOPβ€’5mo ago
okay, here's a 30 minute profile and the latest gc log πŸ™‚ Only 1-2 players online at the time though so it isn't the most representative test. If you want I can do the test again later tonight when more are on https://spark.lucko.me/jd0AfvGo5X
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’5mo ago
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
Requested by element3329
Admincraft Meta
Admincraft Metaβ€’5mo ago
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
βœ… Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by element3329 β€’ Page 1 of 4
Eternal
Eternalβ€’5mo ago
thanks for the custom GC flags! :KEKW:
Snow Kit
Snow Kitβ€’5mo ago
Why does that host have 53gb of swap in use…
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
I take this as sarcasm
Eternal
Eternalβ€’5mo ago
yes but like, you tagged me out of nowhere i think you intended to ping element so i made that to a joke
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
Oh shit my bad
Eternal
Eternalβ€’5mo ago
it's fine :KEKW:
Snow Kit
Snow Kitβ€’5mo ago
To be fair, it’s understandable
Eternal
Eternalβ€’5mo ago
gonna enjoy them GC flags though afaik enviro allocates extra 1gb of swap for each server they might have something similar in place
Snow Kit
Snow Kitβ€’5mo ago
Yeah, but the memory usage plus swap usage well exceeds the amount of memory the machine has And I’m assuming that’s why g1 old is slow
Eternal
Eternalβ€’5mo ago
ah didnt check the spark report so dunno
Snow Kit
Snow Kitβ€’5mo ago
1.3s on G1 old But if part of the heap is in swap it would sound about right
Element
ElementOPβ€’5mo ago
It seems like these flags have caused it to get slightly worse? bigger spikes I've noticed @Jared | InfraCharm How's this looking? forgive me if you're not interested anymore πŸ˜„
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
Your GC is still lagging for some reason
Element
ElementOPβ€’5mo ago
I have no idea why that would be 😭 Is there any info I can give that might help diagnose it? Do you think I should revert to the previous flags? Or are the ones I got the best for now
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
Which host are you using?
Element
ElementOPβ€’5mo ago
PebbleHost Sorry for the ping, do you still have any thoughts on this? πŸ™‚
Eternal
Eternalβ€’5mo ago
budget? premium?
Eternal
Eternalβ€’5mo ago
GitHub
GitHub - brucethemoose/Minecraft-Performance-Flags-Benchmarks: Sane...
Sane, Benchmarked Java Flags and Tweaks for Minecraft - brucethemoose/Minecraft-Performance-Flags-Benchmarks
Eternal
Eternalβ€’5mo ago
GitHub
GitHub - brucethemoose/Minecraft-Performance-Flags-Benchmarks: Sane...
Sane, Benchmarked Java Flags and Tweaks for Minecraft - brucethemoose/Minecraft-Performance-Flags-Benchmarks
ProGamingDk
ProGamingDkβ€’5mo ago
ew no Shendoah is not really good old tests, few are on servers, test is done in a not very stable way
Element
ElementOPβ€’5mo ago
Premium
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
I've done all I can do for you, you were running good so maybe you can revert to the last set. Not sure.
Element
ElementOPβ€’5mo ago
Either way thank you so much for the help you offered πŸ™‚
Element
ElementOPβ€’5mo ago
Ran a spark profile on one of the bad moments. It seems like after the server starts to lag, it doesn't stop until a restart, even if players stop all activity https://spark.lucko.me/fykq2X5fvI Anyone got any ideas?
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’5mo ago
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
βœ… Your server isn't lagging
Your server is running fine with an average TPS of 19.
Requested by element3329 β€’ Page 1 of 4
Element
ElementOPβ€’5mo ago
And those G1 Old and G1 During GCs still seem to be doing real bad It all starts usually after I fly around generating new chunks a lot, but even if I stop doing that, and return to normal play, the lag stays around indefinitely until a restart
Element
ElementOPβ€’5mo ago
And here's a couple of GC logs from directly before and after a server restart when it was rough, if anybody would like to take a look
Admincraft Meta
Admincraft Metaβ€’5mo ago
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
postrestartgc.log
prerestartgc.log
Requested by element3329
Element
ElementOPβ€’4mo ago
!answered
Admincraft Meta
Admincraft Metaβ€’4mo ago
post closed!
The post/thread has been closed!
Requested by element3329#0

Did you find this page helpful?