Spark - worldguard & mythiclib takes half of my server thread
Hi, for some reasons (that I don't understand) my server is lagging since a few days ago because of worldguard and mythicmob.
After some investigation on spark, these 2 plugins these to be "linked".
I don't very know what to do, can someone help me ?
64 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 jupiter_lg#0
Before that, my server wasn't have any lags at all with 80 / 100+ players, here I can't have much more than 30 players..
➡️ Also, my players can do dungeon with the plugin mythicdungeon, dunno if it's because of that (which is weird because there was no problems until now)
Share the spark report
I'm gonna eat some chips and go to sleep so idk if the USA friends can help ya
Logs might help too
Alright
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
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 jupiter_lg#0
90 gb???
yeah don't mind, i'm progressivly decreasing this value.
You know you're not supposed to go higher than 16 right
I was having some issue with OOM around 32Gb
So.. :x
But yeah no worries about that
If it's going oom at 32 gb something is wrong
Running on docker?
I was, not now
So that's why I think too
But no worries it will be decreased at 6AM
Remove alwayspretouch anyways
In the JVM startup flags
If you're in docker you'll run oom
With that flag
Oh alright
What does that do and why does it cause OOM issues?
Anyways, the biggest issue here is some of my plugins who gone wild for some reasons.
It preloads pages in the memory.
The issue is that docker can consider it is going oom
I asked an ai out of curiosity about this.
Using the
alwayspretouch
option in Docker can potentially cause a container to experience Out of Memory (OOM) issues. The alwayspretouch
flag instructs Docker to touch (access) all memory pages during container initialization, which can lead to increased memory usage.
When a container is started, Docker assigns a specific amount of memory to it. This memory is divided into pages, and each page is typically 4KB in size. By default, Docker initializes the container with zeroed memory pages, meaning the pages are not immediately allocated in the host system's memory.
However, when you enable the alwayspretouch
option, Docker will touch every memory page during initialization. This means that all the memory pages will be allocated in the host system's memory, even if they are not immediately used by the container.
As a result, if the container's memory allocation is insufficient to accommodate all the touched memory pages, it can lead to OOM errors.
It doesn't instruct docker tho?
The flag instructs to the jvm
By default java doesn't touch all the pagefilesTLDR, Java will use up as much memory as u give it. So even if u give it 3000gb, it’ll use up 3000gb.
After 16gb you can (and will) actually lose performance.
Ur issue isn’t actually an OOM issue. Remove the pretouch flag. Drop down 12gb
Alright,
About my post, i really don't know how can I fix my issue.. I seems to be related to mythicmobs + worldedit / worldguard in general but, dunno more about that
Start with those 2 things. Then after a bit if the issues are still there give another spark report pls
I know that it's not related to flags : this issue was here even with other flags : that's why I changed to "default flags" on the "flags.sh" website, I also wanted to see if my issue was related to flags before asking here, which is not.
➡️ My actual flags : --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=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -jar Lording.jar --nogui ➡️ My "backup" flags a few days ago (selected by a friend of mine) : -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:AllocatePrefetchStyle=3 -XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=28 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:AllocatePrefetchStyle=3 -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:+EagerJVMCI -Dgraal.TuneInlinerExploration=1 -Dgraal.CompilerConfiguration=enterprise -jar Lording.jar --nogui Between the 2, there is no difference about my issue, that's why i'm here :/..
➡️ My actual flags : --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=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -jar Lording.jar --nogui ➡️ My "backup" flags a few days ago (selected by a friend of mine) : -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:AllocatePrefetchStyle=3 -XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=28 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:AllocatePrefetchStyle=3 -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:+EagerJVMCI -Dgraal.TuneInlinerExploration=1 -Dgraal.CompilerConfiguration=enterprise -jar Lording.jar --nogui Between the 2, there is no difference about my issue, that's why i'm here :/..
Remove the pretouch and lower ur gb, then if the issues persist pls send another spark report
Let’s debug it one step at a time
U had pretouch on both flags btw
So seems like u never tried without it
Alright then, I can keep this post right ?
those flags are from a backup which was not working for some of them, I know that my friend delete pretouch and with some other flags who cancelled my server start
Dunno if I can restore my "classic flags" tbh
But I know that we remove this flags, for sure
Indeed those flags are from 11/08, and we made some modifications 13/08, for some reasons I can't restore this backup.. anyways
I'll came back tomorrow in the morning
About that, should I remove it even if i'm not using pterodactyl ?
I just changed to MSCS
And also, is it better to allocate 16GB in min/max memory, or 2GB on min and 16GB on max for exemple ?
💀 just use aikar flags https://flags.sh
There's not lots of difference
Generally Xms is at a low value like 128M
He is using aikar flags…. Pls read.
@Jupiter , has I’ve said 3 times now.
Remove pretouch, lower the gb, wait a bit, when it lags again send a new spark report
Well for now no issues was reported
But, i was checking my spark report and I saw about 40 MSPT on average with 35+ players, can I optimize that even further ?
https://spark.lucko.me/nudsanl1Bq
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
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.
❌ Outdated
You are using
Purpur-1985 (1.19.4)
. Update to 1.20.1
.❌ entity-activation-range.wake-up-inactive.villagers-for
Decrease this in spigot.yml.
Recommended: 20.
❌ entity-activation-range.wake-up-inactive.flying-monsters-for
Decrease this in spigot.yml.
Recommended: 60.
❌ entity-activation-range.wake-up-inactive.villagers-max-per-tick
Decrease this in spigot.yml.
Recommended: 1.
❌ entity-activation-range.wake-up-inactive.animals-for
Decrease this in spigot.yml.
Recommended: 40.
❌ entity-activation-range.wake-up-inactive.monsters-max-per-tick
Decrease this in spigot.yml.
Recommended: 4.
❌ entity-activation-range.wake-up-inactive.flying-monsters-max-per-tick
Decrease this in spigot.yml.
Recommended: 1.
❌ entity-activation-range.wake-up-inactive.animals-max-per-tick
Decrease this in spigot.yml.
Recommended: 2.
❌ entity-activation-range.wake-up-inactive.monsters-for
Decrease this in spigot.yml.
Recommended: 60.
❌ arrow-despawn-rate
Decrease this in spigot.yml.
Recommended: 300.
❌ tick-rates.container-update
Increase this in config/paper-world-defaults.yml.
Recommended: 3.
❌ mobs.villager.spawn-iron-golem.radius
Increase this in purpur.yml.
Recommended: 5.
Requested by jupiter_lg#0
https://spark.lucko.me/rhhlrKVxWC
Welp, I just came back today on my PC, and it's happenning again.
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
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 jupiter_lg#0
What mythical lib doing
my players can do dungeon with the plugin mythicdungeon
In this dungeon there are custom mobs (with mythicmob)
And mythiclib is a dependency for mythics plugins
But this is weird because there was no problems until now
Ask the dev about the plugins CPU usage
That's all I can think of
Already done.. and he doesn't know either.
Lolol
Is this a pregened world?
Of course.
XX:ThreadPriorityPolicy
What's this thing for?
As I said earlier, it only happens since a few days ago
I'm not sure if it's related to the issue but try to use other java package. Like adoptiums one
his ram usage seems fine
theres a holdup between mythicallib and wolrdguard
^^
its trying to check a worldguard flag for every player on some interaction and that is causing a hold up every check
For the shake of learning, where did you found that?
Yeah they seems to be related : but this is weird because I didn't touch any worldguard flags or things like that :/
And the first weeks my server wasn't lagging at all
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
❌ Processing Error
The bot cannot process this Spark profile. Please use an alternative Spark profile.
Requested by progamingdk#0
"shake" of learning
lmfao
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
❌ Processing Error
The bot cannot process this Spark profile. Please use an alternative Spark profile.
Requested by progamingdk#0
Is the dev aware of this?
Omg lol
Well he asks me to make a very detailled ticket, but I dunno.
idk what the flag is that mythic is checking for, but if thats something u can find out that'll help the dev
I don't think that I can find it through spark ? because I don't have any clues
does mythic have some form of debug command?
Use pufferfish pls no purpur
purpur is fine wat
and completely unrelated, and puffer/purpur wont fix ur issue
the issue is between those 2 plugins
I don't think so
I'll try ask on the worldguard dev server
they wont really help you imo
its mythic calling worldguard thats the issue
i'd check in the mythic disc and see if anyone else has any similar issues
I checked already, i'm the first (that why they want me to create a ticket in their gitlab website
well create a ticket
and hope they can solve it
Yeah that what i'm doing rn, I hope too ^^'
Well, thanks anyways !
Update :
My server almost crash because of these 2 plugins, and now they only take 20% instead of 60% of my server thread..
It's still enormous, but now it's playable
Well the crash report will be helpful in reporting it to the dev