Server marks down as overloaded using little to no CPU?
Hello! Server on 1.21.1, CPU usage sitting at around 1 core, getting dozen of little overloaded logs.
103 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 yucchun#0
The server has 14 CPU cores of an E5-2660, and although that CPU isn't new, actually, is really old, I was expecting it to be able to multi-thread? I have no clue, but CPU usage is sitting at 1-2 cores and the server's struggling a lot to keep a 20TPS rate
Minecraft doesn't properly multithread. So yeah, you are bottlenecked by the CPU because the single thread performance is bad. Try to pre-render the world if you haven't already, otherwise I don't think there is much you can do about that.
Folia is a project which implements multithreading for minecraft server, but not a lot of plugins support it.
I'm sitting on Geyser, Floodgate and Bluemap
I see, alright, I'll try to move over to another CPU, this one is Tampa from Aquatis and I was sort of expecting something to go off badly when I saw the CPU model
https://github.com/BlockhostOfficial/folia-plugins
Bluemap and Geyser seem to have folia support
GitHub
GitHub - BlockhostOfficial/folia-plugins: List of popular plugins t...
List of popular plugins that support Folia - multithreaded PaperMC fork - BlockhostOfficial/folia-plugins
Does Folia work alright with Minecraft itself? It's a SMP so we're sort of trying to make sure game functionality is kept, the plugins are optional
FAQ | PaperMC Docs
Questions frequently asked by our community, answered by us!
It's only really thought for large servers but maybe still worth a try, never used it myself though
Easier fix would be to switch to any provider which offers Ryzen 9 7950X servers. Depends on your budget.
the big issue here is just whether we'll be able to serve all players w decent ping
What are your startup flags? Maybe we can work out optimization so you don't need to spend more money on Hardware. Back in 2015 this is the CPU that ran minecraft for bigger servers, so there is no reason why it can't now.
i'll be honest, i'm just running default flags
java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -jar server.jar
Pterodactyl?
yes
it's a really weird server configuration, but it works, 14 cores/16GB RAM LOL
Okay, can you tell me what resources you have allocated to each server container (if you have multiple)
It's just this server, I have it running on Pterodactyl just in case people need to come in and restart the server
Okay, what do you have allocated to it? Memory/CPU/BlockIO if you have that enabled
16 GB RAM, all the CPU cores, nothing limiting IO
Okay, and that's all allocated to the server in the panel?
Are you running on an HDD or an SSD?
mhm!
SSD, NVMe
Great, that's a plus!
Modify your startup parameters to match this:
java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M -jar server.jar
Go ahead and download and install this plugin:
https://www.spigotmc.org/resources/spark.57242/
Once that plugin is loaded, run /spark profiler start --timeout 1200
The Spark report will run for 20 minutes. A new file called gc.log
will be created in your Minecraft server's root directory.
Send me both the spark report and the gc.log
after those 20 minutes and we will start optimizing your server πalright! let me just give everyone a heads up that i'll restart the server
Hey! Just seeing where you're at with this π
hi! sorry, just started it
oh lord
It's alright, that's what we're fixing
hey! it just finished
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.
β 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 yucchun β’ Page 4 of 4
o
Great! go ahead and send me the
gc.log
aswellWe 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 yucchun
here!
Thanks
We have 4 players in-game right now
How bad is the situation LOL
Ehhh I've seen worse
Update your startup parameters to match above.
run
/spark profiler start --timeout 1200
The Spark report will run for another 20 minutes.
Send me both the spark report and the gc.log again after those 20 minutes and we will see how this helped π
@yucchunSet it! Restaring right now
rah
Itβs alright, this takes 3-5 tries to get it right
there's a possibility that the cpu just isn't the right piece for this anymore
Is blue map rendering?
oh yep, it was, just froze the world
i keep forgetting to make it stop rendering when there's players on-line
howβs cpu usage now
200-700%
perfect
considerably better
TPS?
9.66
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.
β Aikar's Flags
β 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.
β entity-activation-range.villagers
Decrease this in spigot.yml.
Recommended: 16.
Plus 35 more recommendations
Click the buttons below to see more
Requested by yucchun β’ Page 1 of 4
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-latest.log
Requested by yucchun
yucchun your performance issues is caused by datapacks
Just finished!
using around 50% of the main thread
we just have dynamiclights on
can it use that much?
yes
and we just turned it on too
datapacks can be insanely ineffecient
one minute, let me take it off
and ofcourse would recommend getting a better cpu
i'll get a 5950x with the same provider and move it there
do note vps also have virtualization overhead
which is what i assume it is
https://docs.bloom.host/datapacks/#disclaimer https://misode.github.io/report/
use these two to see what commands are causing the lag so you can hopefully find whats causing them
plugins made in mccreator can use functions, and is very bad
do you think folia could solve my issue here?
no
Folia wants atleast 16 CORES 32 threads, only helps with spread out players, plugins are missing, api isnt stable, its not production ready
and you still want a high singlethreaded performance cpu
i could grab the entire e5-2660, but it probably won't solve the situation, right?
since single-thread is terrible
You donβt have the entire system?
I thought you had a dedi
no
i'm splicing it up on proxmox, half linux half windows
Oh
In that case youβll probably want to get a decent VPS or dedicate the system to MC, but that would be a waste of resources imo
i mean for a 10-player max SMP, owch
what i don't get is when the cpu's at 1.6 cores and the TPS is still low
like, here
mc isnt very multithreaded
very few things in mc are
even on paper
do this
will do!
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
did you try and send the zip?
yes
put it into misodes
just server tick
Can you send screenshot of the like first 10 ones
This?
I assume this is after removing the dynamic light one?
Can you make a new report
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
it's way better now :D
still meh meh but better
i meant a new spark report π
OH! wait
running in 5min
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
here!
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-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.
β merge-radius.item
Increase this in spigot.yml.
Recommended: 4.0.
β merge-radius.exp
Increase this in spigot.yml.
Recommended: 6.0.
β chunks.max-auto-save-chunks-per-tick
Decrease this in config/paper-world-defaults.yml.
Recommended: 6.
β 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.
Requested by yucchun β’ Page 2 of 4
the flags seem to have worked well
these ig
your issue wasnt with gc
your issue was half the servers main thread was being used by the datapack
hey! so, although it was working OK and we were getting optimal TPS, that was only the case in pre-loaded chunks and it ended up going down to 11 once 1-2 players started loading new ones in, iβll run chunky for now and move it over to another dedicated once it arrives, i just ordered one with a 9950x, do you think thatβd be enough?
You'll definitely notice an improvement
sorry ^ meant optimal TPS
Iβll see, between this and ordering server hosting, should I just rent something Shockbyte/game-hosting? LOL
No
shockbyte is shit
gamehosting yes
lower overhead, and usually better cpus
yes, pregen more and use a worldborder
chunk gen is hard on any server
Just use folia(configure it properly) and pregen the world, that's it.
No
no