Chunk loading far from spawn + /worldborder
So on my 1.21 spigot SMP, I found out a player was traveling in a straight line away from spawn. They were at 33,000 blocks (they're doing it for the Adventuring Time advancement but I said it was a bad way of doing that advancement), and I didn't want them loading more chunks far out so I set the world border to a 35,000 radius. I didn't want excessive chunk loading because people already complained about lag on the server. Now I have someone complaining that reducing the world border also caused more lag.
So this left me with a couple questions:
1) Is there a correlation between distance traveled from spawn and memory/RAM usage? Or is it just number of chunks loaded and doesn't matter how far out you are from spawn?
2) Does altering the world border cause lag in any way? That didn't make sense to me when someone claimed it did cause more lag.
I feel like these are pretty general questions but if you need more information like plugins on the server or the processor let me know.
38 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 sir_untouchable#0
Have you pregenerated?
If you have not pregenerated, players exploring new areas / chunks will cause lag (chunk gen is one of the heaviest parts of a server)
No, how do I do this? Can it still be done after everyone has been exploring the world for a few days?
yeah
Pregenerating is the act of generating EVERY chunk within a radius
If your worldborder is at 35k, you'd have to pregen a radius of 35k
!chunky
Plugin: Chunky
Chunky is a plugin that will load chunks in a defined radius into server memory, making it easier, and less performance impacting on your server when a player loads those chunks.
If you've setup a worldborder, start with by typing
/chunky worldborder
. Otherwise, you can set a radius using /chunky radius #
. Then run /chunky start
.
It is a good idea to let this run with no players online. If your server does crash, just start it back up and /chunky resume
and it should pick back up where it left off.
Once it tells you that the task is finished, you may remove the chunky plugin folder and the Chunky .jar from your server.Admincraft Canned Responses
also a mod ^
and no, changing worldborder does not cauase lag, but players can generate new chunks = more lag
What about question 1) ?
A correlation between memory usage and distance from spawn?
Or no correlation?
distance from spawn no
but more players? yes
they will load more chunks which means higher ram usage
Thank you so much. I'll look into this Chunky thing
hold
how much storage do you have?
RAM?
5 GB
no
disk storage
Oh
?
Sorry I had to look up where to find that info..
Looks like about 5.3 GB right now
I can't imagine that's good
total disk space?
or used
Used
what about total disk space
available*
Sorry I'm not sure where to find that and I'm only on my phone right now I'd have to get to you later. Could I ping you?
yeah go for it
i'm only saying because of this
if you pregen your overworld (and nether + end) it's going to use 216gb
Ah
I mean I don't want to actually load 35k. I have an issue with that player loading that much
They're pretty adamant on doing it though...
What about say 10k blocks radius?
the problem is, since you have let them go so far, you can't just pregenerate 10k when players have gone out to 33k
so they're still going to cause lag
Well it's one person
Everyone else is like not even 4k out
Is it still not worth it?
you can do it if you want
you can try ask the person if they're okay with moving to somewhere within 10k from spawn
but yeah, 10k is good
Okay I'll try it. Do you mind telling me how much space is required to load 10k radius?
do you want to pregenerate the nether & end too (uses less space compared to overworld)
That's a good estimate to go off thanks
Thanks for your help
also
word of warning
Pregenerating with Chunky will take a LONG time (could take up to or over 24 hours) (chunky is the fastest and best plugin / mod for pregenning)
you can do multiple pregens at once (overworld, nether and end) but it's very resource intensive
you usually should close your server (don't let anyone join) while pregeneration
or there are some addons that stop and restart the pregen tasks when players join & leave
Great to know
It's a small server so I could probably get away with it closed for a day
Personally I use fastchunkpregenerator, I had a lot of problems with chunky on newer versions (ymmv). FCP was much faster and worked without a single glitch.
At any rate, whatever you choose, pregen everything inside whatever worldborder you set, in all worlds. You can delete the region files for the areas they explored outside the border, but that's not strictly necessary and it's an opportunity to make a mistake that could delete someone's land.
what issues did you have?
In 1.19.x it didn't generate the whole chunks down below y0, using whatever latest build I could find from either their discord or github (been a while so I don't remember exactly). Therefore those chunks all had to generate the lower coords as players entered.
In one 1.20.x server I forgot to remove the plugin after generating, and it was causing huge lag spikes just by existing on the server. Deleting it solved that problem fully.
On another 1.20.x server it just kept generating right past the vanilla border, even though I could go see the border physically there (not just the normal few chunks outside; it kept going).
that
did you set it to worldborder mode
or just radius etc
Fairly certain I used the same correct settings I've used many dozens of times for various servers.
Not trying to make this into a chunky hate thread, just tossing out another plugin I had a lot better experience with.