A
Admincraftβ€’5mo ago
jacob

Server Lag (CPU and RAM fine, TPS falls)

spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
90 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.
❌ entities.spawning.despawn-ranges.monster.hard
Decrease this in config/paper-world-defaults.yml. Recommended: 96.
❌ entities.spawning.despawn-ranges.underground_water_creature.soft
Decrease this in config/paper-world-defaults.yml. Recommended: 28.
❌ entities.spawning.despawn-ranges.underground_water_creature.hard
Decrease this in config/paper-world-defaults.yml. Recommended: 96.
❌ entities.spawning.despawn-ranges.water_ambient.soft
Decrease this in config/paper-world-defaults.yml. Recommended: 28.
❌ entities.spawning.despawn-ranges.water_creature.soft
Decrease this in config/paper-world-defaults.yml. Recommended: 28.
❌ entities.spawning.despawn-ranges.water_creature.hard
Decrease this in config/paper-world-defaults.yml. Recommended: 96.
❌ misc.redstone-implementation
Set this to "ALTERNATE_CURRENT" in config/paper-world-defaults.yml.
❌ chunks.entity-per-chunk-save-limit.experience_orb
Set a value in config/paper-world-defaults.yml. Recommended: 16.
❌ chunks.entity-per-chunk-save-limit.snowball
Set a value in config/paper-world-defaults.yml. Recommended: 16.
❌ chunks.entity-per-chunk-save-limit.ender_pearl
Set a value in config/paper-world-defaults.yml. Recommended: 16.
❌ chunks.entity-per-chunk-save-limit.arrow
Set a value in config/paper-world-defaults.yml. Recommended: 16.
Requested by its_jakov β€’ Page 4 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 its_jakov#0
jacob
jacobOPβ€’5mo ago
What's going on?
Skullians
Skulliansβ€’5mo ago
1. shitty cpu, you should change. 2. switch to ZNPCsPlus (latest dev build). Citizens is laggy AF. ZNPcsPlus has a migrator too 3. the 159 vindicators are arguably the laggiest mob on your server
Skullians
Skulliansβ€’5mo ago
4. I would recommend you move to 1.20.4 and use Pufferfish as it is more performant than Paper (all paper plugins work on puffer)
Pufferfish Host | Downloads - Pufferfish Fork
Download Pufferfish and Pufferfish+ Minecraft server jars
Skullians
Skulliansβ€’5mo ago
!optimise 5. Check out Eternity's guide
Carl-bot
Carl-botβ€’5mo ago
You can follow these guides to optimize your server
Admincraft Canned Responses
Skullians
Skulliansβ€’5mo ago
ProtocolLib is rather laggy so i'd recommend you try find alternative plugin(s) that doesn't use PLib as a dependency
jacob
jacobOPβ€’5mo ago
are you sure its nothing to do with my chunk settings? :catThink:
Skullians
Skulliansβ€’5mo ago
?
jacob
jacobOPβ€’5mo ago
I drop from 20tps to 10tps in one huge spike and I'm not sure why I don't even do anything yet, It wouldn't make sense I just kileld all vindicators and I'm not that near any NPCs every time I move into new chunks my tps drops from 20 to 9 Every time I load into another world everything dies for a minute I get really random tps spikes
Skullians
Skulliansβ€’5mo ago
Sounds like your cpu being awful (not surprised, that cpu sucks for mc) and/or a drive issue
SilentBot
SilentBotβ€’5mo ago
Just to add to the above, the profiler was only running for 13 seconds:
No description
SilentBot
SilentBotβ€’5mo ago
So it's not super useful in determining what the usual baseline for the server is before it lags And what changed when it is lagging. Provide a longer running profile if you'd like more details But basically what Skullians said, the processor you're using has very poor single threaded performance, and there is nothing that clearly stands out aside from the poor garbage collection times. You can try @Jared | InfraCharm 's site https://flags.infracharm.com/ to help with the garbage collection But I'm unsure how finished it is
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
It's not done yet doesn't work
SilentBot
SilentBotβ€’5mo ago
Ah, there's that answer πŸ˜„
Skullians
Skulliansβ€’5mo ago
^^ what silent said One of the previous sparks that lasted longer (that you provided in a previous thread) did show that citizens is still causing a LOT of lag at 20% thread usage so you should really focus on upgrading your CPU (preferably AWAY from contabo) and migrating to ZNPCsPlus
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
Skull get me their gc.log and an upgraded spark report and startup flags Their GC can be optimized, might help
Skullians
Skulliansβ€’5mo ago
your GC isn't ideal though yeah will do, will ping you once done
SilentBot
SilentBotβ€’5mo ago
If you want a hand with it, feel free to shout, me and I'm sure @Snow Kit would be happy to help, seems like a useful resource to have.
Skullians
Skulliansβ€’5mo ago
@jacob When you get the chance: add -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M to your startup flags (anywhere before the -jar at the end). Restart your server. Run a spark profiler (through /spark profiler start) and let it run for ~15 minutes After 15 minutes, stop the profiler, send the spark here, and also send the file name gc.log in your server folder here
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
It's more just setting up the algorithms and such. Might need help with making an API
SilentBot
SilentBotβ€’5mo ago
πŸ‘ feel free to poke us if you do need/want a hand
Skullians
Skulliansβ€’5mo ago
why does this default to 65gb container memory LOL oops ping sorry
SilentBot
SilentBotβ€’5mo ago
1/2 of 128 πŸ˜„
Skullians
Skulliansβ€’5mo ago
lol my server uses 32 threads and 128gb ram!!
SilentBot
SilentBotβ€’5mo ago
At what point do you add a big red banner and just say "don't do this"
Skullians
Skulliansβ€’5mo ago
when they send you a dm asking why you can't set server memory to 1024gb :dawg:
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
swap
Skullians
Skulliansβ€’5mo ago
:doom_wojak:
Snow Kit
Snow Kitβ€’5mo ago
I've never looked at gc logs before tbh, but how does it (theoretically) know how to make the flags from that log file?
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
You can see the time it takes for GC to act, how long it's paused for, heap sizes -etc
Snow Kit
Snow Kitβ€’5mo ago
interesting :thinkies:
Skullians
Skulliansβ€’5mo ago
so essentially it's just knowing how to read gc logs and knowing how to tweak certain flags?
ProGamingDk
ProGamingDkβ€’5mo ago
so we make chatgpt do it for us
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
mhm
piggy
piggyβ€’5mo ago
@Jared | InfraCharm
infracharm has reached level 4! Roles Added: Level 4
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
fk off
Skullians
Skulliansβ€’5mo ago
interesting :LUL:
jacob
jacobOPβ€’5mo ago
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.
❓INFO
You are using 1.20.2. Latest currently is 1.21.1.
❌ chunk-gc.period-in-ticks
Decrease this in bukkit.yml. Recommended: 400.
❌ 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.
❌ entity-activation-range.villagers
Decrease this in spigot.yml. Recommended: 16.
❌ 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.
Plus 19 more recommendations
Click the buttons below to see more
Requested by its_jakov β€’ Page 1 of 3
ProGamingDk
ProGamingDkβ€’5mo ago
contabo 😭
jacob
jacobOPβ€’5mo ago
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 its_jakov
jacob
jacobOPβ€’5mo ago
@Skullians @SilentBot
Skullians
Skulliansβ€’5mo ago
@Jared | InfraCharm
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
thanks
Skullians
Skulliansβ€’5mo ago
np
SilentBot
SilentBotβ€’5mo ago
Hopefully the garbage collection does help, as when your tps drops below 20, your ticks are still only taking around ~25ms
jacob
jacobOPβ€’5mo ago
my tps is 11 :(
ProGamingDk
ProGamingDkβ€’5mo ago
wouldnt be surprised if its because of oversold hardware its contabo
SilentBot
SilentBotβ€’5mo ago
Yeah... Though you'd expect/hope that to at least appear in the timings
ProGamingDk
ProGamingDkβ€’5mo ago
interesting
No description
ProGamingDk
ProGamingDkβ€’5mo ago
23% being used on just mythicmobs and disguises
SilentBot
SilentBotβ€’5mo ago
If you change it to time per tick, it gets more sus
SilentBot
SilentBotβ€’5mo ago
No description
SilentBot
SilentBotβ€’5mo ago
The entire tick on the laggiest spike was 25ms total So that should be a perfect 20tps, with 25ms free
jacob
jacobOPβ€’5mo ago
what does that mean? why is my tps falling then? :catThink: i might have some weird chunk loading settings?
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
paper-global.yml
paper-world-defaults.yml
Requested by its_jakov
jacob
jacobOPβ€’5mo ago
here's my paper files
ProGamingDk
ProGamingDkβ€’5mo ago
overloaded cpu, can cause it which makes sense
jacob
jacobOPβ€’5mo ago
ive narrowed it down to 2 plugins :guninmouth:
Skullians
Skulliansβ€’5mo ago
which ones
jacob
jacobOPβ€’5mo ago
its citizens :P
SilentBot
SilentBotβ€’5mo ago
The two red blobs I added is all that Citizens is adding to your laggiest ticks:
No description
SilentBot
SilentBotβ€’5mo ago
(the width is what matters)
Skullians
Skulliansβ€’5mo ago
... literally what i said at the start, in two separate threads
SilentBot
SilentBotβ€’5mo ago
As what was said by Pro earlier, more is being used by disguises than citizens
jacob
jacobOPβ€’5mo ago
maybe its not directly citizens? maybe some citizens hook? idk :ccshrug: all i know is when i remove citizens it doesnt drop below 19
jacob
jacobOPβ€’5mo ago
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 its_jakov β€’ Page 1 of 3
jacob
jacobOPβ€’5mo ago
this is a new one
SilentBot
SilentBotβ€’5mo ago
That report ran for a total of 1 minute And disguises is not on the report at all So whatever uses MMOlib/MythicLib is no longer loaded? Aka MythicMobs
jacob
jacobOPβ€’5mo ago
Oh, when I removed disguises, it still lagged a lot huh?
SilentBot
SilentBotβ€’5mo ago
Still loaded, just using a bunch less resources Β―\_(ツ)_/Β―
Tamz
Tamzβ€’5mo ago
Amazon.com Inc :uncanny:
SilentBot
SilentBotβ€’5mo ago
But yeah, even excluding citizens, every other plugin was also using way less resources in the 2nd report:
No description
SilentBot
SilentBotβ€’5mo ago
So unless there was some sort of interaction between Citizens and the other plugins, I'd expect the lag to be back.
ProGamingDk
ProGamingDkβ€’5mo ago
the new one was 1 minute and 32 seconds long + thats another issue with overloaded hardware, even bad performance isnt stable
SilentBot
SilentBotβ€’5mo ago
Yeah Was nowhere long enough to be respective
Bruhdows
Bruhdowsβ€’5mo ago
Seems like Citizens <-> MythicMobs integration
SilentBot
SilentBotβ€’5mo ago
Seems like MythicalMobs can act as NPCs anyway (never used it), so unsure why you'd need both anyway
Bruhdows
Bruhdowsβ€’5mo ago
I think MythicMobs require LibsDisguises that requires ProtocolLib (for NPCs)
SilentBot
SilentBotβ€’5mo ago
They still have all 3, all they removed was citizens
Bruhdows
Bruhdowsβ€’5mo ago
I remember ajLeaderboards loving to make alot of random tasks
Skullians
Skulliansβ€’5mo ago
ajleaderboards makes a shit ton of threads iirc
Bruhdows
Bruhdowsβ€’5mo ago
Like one time I've had 7k+ tasks from just ajLeaderboards You should consider using Topper jacob https://www.spigotmc.org/resources/topper.101325/ Best plugin that i've used ngl
Jared | InfraCharm
Jared | InfraCharmβ€’5mo ago
@jacob @Skullians
java -Xms8G -Xmx10G -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=80 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Duser.timezone=GMT -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+UseFastUnorderedTimeStamps -XX:+UseNUMA -XX:+UseLargePagesInMetaspace -XX:+UseBiasedLocking -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
java -Xms8G -Xmx10G -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=80 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Duser.timezone=GMT -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+UseFastUnorderedTimeStamps -XX:+UseNUMA -XX:+UseLargePagesInMetaspace -XX:+UseBiasedLocking -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
If a flag does not allow your server to start, remove the flag and let me know which one it was so we can substitute it. Send me a new gc.log and spark report in 60 minutes
jacob
jacobOPβ€’5mo ago
I decided to just upgrade my server in hopes that fixes it, thanks

Did you find this page helpful?