A
Admincraftβ€’6mo ago
Bacon

Purpur server TPS collapses, add.AdditionalSaveData wrecking havoc

The server runs on a dedicated machine, CPU and RAM more than enough but it is somehow bottlenecking itself to oblivion. And it appears the blame is as it shows on the screenshot. Running at about 1 per ms, by 20 of these calls its 1 tick, this is happening with EVERY mob that spawns. I can't find where is this coming from, it shows it may be a datapack, but none of the datapacks edit mobs now, which is whats causing the tps drops. Can someone provide some guidance? Brain is melting after trying literally everything and been unable to find discussions with this problem elsewhere.
No description
77 Replies
Admincraft Meta
Admincraft Metaβ€’6mo 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 thebacon.#0
Skullians
Skulliansβ€’6mo ago
send the spark :/
Bacon
BaconOPβ€’6mo ago
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’6mo 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.
❌ 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.mob-spawner
Increase this in config/paper-world-defaults.yml. Recommended: 2.
❌ 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 thebacon.
Skullians
Skulliansβ€’6mo ago
That CPU is god awful change asap Do you have any command blocks? or datapacks?
Bacon
BaconOPβ€’6mo ago
the CPU is fine it's just more active attm, but the TPS was still collapsing even when it was empty
Skullians
Skulliansβ€’6mo ago
no... it's not
Skullians
Skulliansβ€’6mo ago
this is not fine
No description
Skullians
Skulliansβ€’6mo ago
(context: single thread is what matters for minecraft. GHz or multithread is irrelevant)
Bacon
BaconOPβ€’6mo ago
it's not the actual machine CPU it's on Pterodactyl, so dockarize and assigned several threads to run on, but I can unlock it to use all at will
Skullians
Skulliansβ€’6mo ago
yes but... minecraft is primarily singlethreaded
Bacon
BaconOPβ€’6mo ago
the cpu is an E3-1230v6
Skullians
Skulliansβ€’6mo ago
yes i know so giving it unlimited use of the cpu does nothing because the singlethreaded perf sucks
Bacon
BaconOPβ€’6mo ago
ah yes, for what we need it works ok, it's pretty much the same single-thread performance as the i7-7700K.
Skullians
Skulliansβ€’6mo ago
…. an i7-7700k is almost 1000 more MOps/Sec singlethread 2,719 to be exact . .
Bacon
BaconOPβ€’6mo ago
about all on plugins
No description
Bacon
BaconOPβ€’6mo ago
terralith and so forfh, the other admin did the pack, while this problem began to sink the tps it started hitting back at entity spawn
Skullians
Skulliansβ€’6mo ago
can you provide a list of what datapacks you have
Bacon
BaconOPβ€’6mo ago
oh oups my derp sorry,
No description
Skullians
Skulliansβ€’6mo ago
jesus try find plugin alternatives for as many of those as possible. please run the β€˜/perf start’ command then chuck the zip file generated in the /debug/profiling folder into https://misode.github.io/report/ and go to the profiling section
Bacon
BaconOPβ€’6mo ago
perf is the one that's not working, it doesn't do anything idk why /perf starts running and ends without an error, no logs no nothing
Skullians
Skulliansβ€’6mo ago
yes it makes a zip file in the debug folder
Bacon
BaconOPβ€’6mo ago
it's unresponsive to /perf start, if I do stop right after it says it's not running
Skullians
Skulliansβ€’6mo ago
does it make any file in the /debug/profiling folder
Bacon
BaconOPβ€’6mo ago
from the home install folder no debug, maybe because the folder is not created?
Skullians
Skulliansβ€’6mo ago
Are you running the command in console or ingame?
Bacon
BaconOPβ€’6mo ago
ig, on the console does something else I guess better to start with this issue then, /perf not starting hmm
Skullians
Skulliansβ€’6mo ago
It should be running. Try do it ingame always and ensure you have permissions for it, and bear in mind it finishes after 10 seconds
Bacon
BaconOPβ€’6mo ago
I am researching to understand why of this, I manually created and gave perms on the .minecraft/debug folder but that didn't got it to start can this be because of /timings?
Skullians
Skulliansβ€’6mo ago
/timings shouldn’t exist If it is enabled disable it
Bacon
BaconOPβ€’6mo ago
what I just got from purpur said perf is disabled, is meant to use spark
Skullians
Skulliansβ€’6mo ago
oh :/
Bacon
BaconOPβ€’6mo ago
I am actually running spark right now, every hour of uptime, something kicks that gets the tick rate to recover back to 20 instantly then after a few minutes, it goes back to 10 and below
Skullians
Skulliansβ€’6mo ago
purpur should have the option to turn /perf back on (temporarily)
Bacon
BaconOPβ€’6mo ago
so I'm seeing if this spark capture actually captures the drop
Skullians
Skulliansβ€’6mo ago
you can use the only ticks over flag to only capture ticks that are laggy
Bacon
BaconOPβ€’6mo ago
this the last one recovered to 20 and collapsed to under 10 at the end https://spark.lucko.me/jiP7DS2b7x
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’6mo 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.
❌ 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.mob-spawner
Increase this in config/paper-world-defaults.yml. Recommended: 2.
❌ 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 thebacon.
Skullians
Skulliansβ€’6mo ago
Do the lag spikes happen frequently? How often?
Bacon
BaconOPβ€’6mo ago
with 3 peeps on was consistently around 10 or even below, then it did that recovery per hour of uptime and went consistently to the same after few mins when generating chunks that's heavy on it too apparently
Skullians
Skulliansβ€’6mo ago
You should pregenerate :/
Bacon
BaconOPβ€’6mo ago
yeah we did if I travel around chunks that were pregen just server loading and mob spawn will tank it but it recovers after with several peeps on, it will be consistent, it's not a tps collapse when it loads/gens and recovers, it's just the collapse even if 3 players are in place doing their stuff it won't sustain past 15
Skullians
Skulliansβ€’6mo ago
!binary you can try do a binary search on all your datapacks
Carl-bot
Carl-botβ€’6mo ago
Binary search your plugins
Remove half of your non-essential (ie not things like PAPI or LuckPerm) plugins and see if the problem is fixed. If it still persists, the cause is in the half still installed. Continue to halve the remaining plugins until you've narrowed it down to a single plugin. Congratulations, you found the culprit.
From An unknown user
Admincraft Canned Responses
Bacon
BaconOPβ€’6mo ago
yep will need the dev to help there I know these things have such intertwined dependencies it's not even funny
Skullians
Skulliansβ€’6mo ago
Datapacks are poorly optimised in general and you should remove as many as possible, or find plugin alternatives
lavaking46
lavaking46β€’6mo ago
Several of those packs are world gen packs or structure packs which shouldn't have to many issues. If you can get /perf working it will massively help you identify the culprit.
Bacon
BaconOPβ€’6mo ago
Do you have an idea how to get past the disable purpur did on perf? they also did the same on timings. https://github.com/PurpurMC/Purpur/blob/ver/1.21.1/patches/server/0254-Remove-Mojang-Profiler.patch Found the purpur patch that disables perf, removing it and compiling might do the trick, not used to how to actually successfully compile this hm
lavaking46
lavaking46β€’6mo ago
No description
lavaking46
lavaking46β€’6mo ago
@Bacon
Bacon
BaconOPβ€’6mo ago
oof πŸ™
lavaking46
lavaking46β€’6mo ago
thats on their github page
lavaking46
lavaking46β€’6mo ago
GitHub
GitHub - PurpurMC/Purpur: Purpur is a drop-in replacement for Paper...
Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features. - PurpurMC/Purpur
Bacon
BaconOPβ€’6mo ago
yep got there until the part where it compiles and F
> Configure project :
paperweight-patcher v1.7.1 (running on 'Linux')

> Task :purpur-api:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':purpur-api:compileJava'.
> error: release version 21 not supported
> Configure project :
paperweight-patcher v1.7.1 (running on 'Linux')

> Task :purpur-api:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':purpur-api:compileJava'.
> error: release version 21 not supported
Got me lost there, server has java 21 installed same version as the gradlew --version
ProGamingDk
ProGamingDkβ€’6mo ago
what do you even use from purpurs config
Admincraft Meta
Admincraft Metaβ€’6mo ago
For safety reasons we do not allow executables to be sent as they might contain malware. If you're compiling for someone please DM them and as a reminder. We cannot verify if a compiled jar has not been tampered in any way For safety reasons we do not allow executables to be sent as they might contain malware. If you're compiling for someone please DM them and as a reminder. We cannot verify if a compiled jar has not been tampered in any way
Bacon
BaconOPβ€’6mo ago
ok so no zip's hm
Skullians
Skulliansβ€’6mo ago
DM it if you wish
Bacon
BaconOPβ€’6mo ago
sorry the derp, here the perfs I took: https://mega.nz/folder/0kNCCAoK#qymwIQPfnMz_KkHvYo2TQA They with 2 peeps on, 2024-08-26_14_34_47-world-1_21_1 with 3 peeps on.
Skullians
Skulliansβ€’6mo ago
look into ketket furnitures and cavernous (datapacks) they're arguably the laggiest datapacks
Bacon
BaconOPβ€’6mo ago
kk thank you, relayed this to the dev I think he can get a plugin alt for cavernous, the furnitures is easy to understand it oof'ing. any other feedback?
Skullians
Skulliansβ€’6mo ago
these are your laggiest functions
No description
Skullians
Skulliansβ€’6mo ago
ketket and cavernous are the laggiest I would recommend you move to ZNPCsPlus (use their latest development build) over Citizens. It's more performant They have a migrator too Do you use any of the additional purpur customisation options?
Bacon
BaconOPβ€’6mo ago
no, don't believe so
Skullians
Skulliansβ€’6mo ago
then you'd be better off using https://pufferfish.host/downloads
Pufferfish Host | Downloads - Pufferfish Fork
Download Pufferfish and Pufferfish+ Minecraft server jars
Skullians
Skulliansβ€’6mo ago
you'd only use purpur if you need its customisation options otherwise use puffer
Bacon
BaconOPβ€’6mo ago
ah yes he wanted customization but we ran into the tps oof before got to that point how did you parse the perf data like that btw?
ProGamingDk
ProGamingDkβ€’6mo ago
misodes report website misode.github.io/report/
Bacon
BaconOPβ€’6mo ago
thank you! By the way, we removed furniture that was the largest culprit, but we dealing with cavernous now. It makes no sense to using that much tick rate when terralith/terratonic are fine. Especially when playing on nether for example. We're using this https://modrinth.com/datapack/cavernous-x-patched What would be the next steps, removing cavernous will not let the world boot but it's not necessary as we already know it's the culprit.
lavaking46
lavaking46β€’6mo ago
I would recommend getting with your dev to see if they can go through the datapack and optimize the datapack and possibly just remove the command based systems and make them into a plugin.
Bacon
BaconOPβ€’6mo ago
investigation time jesus this is quite the challenge
lavaking46
lavaking46β€’6mo ago
ye
Bacon
BaconOPβ€’6mo ago
Also on the last spark profile, what is this?
No description
lavaking46
lavaking46β€’6mo ago
that is almost guarenteed a datapack. thats when a command uses something like @a or @e as it then has to catalogue and reference every entity. typical recommendations for datapack devs is to use those as little as possible(if trying to be efficient) and if possible have one or none of those.
Bacon
BaconOPβ€’6mo ago
the .test on the end made me sus
lavaking46
lavaking46β€’6mo ago
Its the game testing entities to see what ones match specified parameters of a search iirc

Did you find this page helpful?