Help with Minecraft Multithreading
I really need help with multithreading so I can get my server to run my instances well. I looked at a thread which enables parallelization but when I try the command in the jvm args which is what it was... the server performance overall suffers. While mobs are much more quickly handled, chunk loading times became abysmal and the server does NOT like it when a new player joins. I'm trying to run a modded server and I don't know what to do to improve the experience for my players.
127 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 serinalmmpt001#0
Server is a Contabo-hosted Ubuntu blank-slate VPS I set up myself with PufferPanel.
Minecraft is a primarily single threaded game. There is no way to do what you're asking.
Sorry roommate typing on my computer.
Well there is a command to enable multiple threads, and I've seen people suggest using it but the chunk loading times become HORRIBLE when I try it.
contabo is hot garbage for minecraft servers, or really for anything
Not from my experience.
Yeah that doesn't mean minecraft can utilize it.
Lucky previous experience, but that doesn't mean maven is wrong.
Lucky current experience.
I still use it.
You're complaining about performance problems while denying that contabo has performance limitations..
Any server has limitations.
It's just how HIGH those limitations are.
That's obviously not what I meant.
I tried Sparkhost, garbage. GGservers, garbage (and overpriced for their supreme tier.)
minecraft mostly isnt multi threaded, using flags to enable parallelization isnt going to force it to be multi threaded
Believe it or not, Contabo is the ONLY SERVER I have managed to squeeze a lot of performance out of.
ok
get a good trusted host that uses a new ryzen cpu, and optimise the mods using most of the main thread
The server I'm running has a Ryzen 7000-series
Not an oversold one
It works, and it works pretty damn well. :/
Till, for some damn reason, it tries to go over 16GB RAMspace.
Even though it has 30GB dedicated (says so on the page.)
and that's not GiB mind you.
So yeah it does come out to 29.4GiB
Don't give minecraft more than 12GB of heap, it almost never will need it.
._. I'm running modded?
listed garbage. ofc they’re garbage
Even modded
Contabo has been the only server that I've seen run a consistent 20TPS out of. Till I hit the 15GB RAM problem. :/
That might be worth a try.
you haven’t tried many other viable options then
Most other viable options are unavailable to me due to budgeting reasons.
AND DO NOT SAY ATERNOS. THEIR INTERFACE SUCKS.
Well we aren't suggesting you to switch from garbage... To garbage..
noone would recommend or tell u to use aternos
Check the hosts in #marketplace
atleast here
We already know aternos sucks
that’s crazy that the immediate reaction was “DONT SAY ATERNOS”
I am currently using contabo and indeed it is garbage, but again, depends on your configuration etc. i was able to run a 14 player peak semi-vanilla on it with 19-20 tps.
Well, a lot of youtubers nowdays love to praise Aternos a lot for everything
shills
¯\_(ツ)_/¯
Aternos can go suck an egg.
Contabo is a good start for anyone looking on how to exactly host as it's cheap, but hosting anything serious on it is just asking for issues.
many kids that play Minecraft can't pay a server ;-;
Aternos is the best option for users that don't know how to do basic things on a computer
Like running a jar through cmd/terminal
I said praise (eg. omg look Aternos added a thing that even other free hosts had for ages)
I can set up servers using BASH SHELL! 😄
back to the topic at hand though. iirc, there are jars coming close to multi threading, but it’s not traditional multi threading?
Although a hosting will always be better than selfhosting 🙏 what was your budget? Just wondering.
hes on modded
word
Aternos can be used to get the owner of offline UUIDs
?
Depends on the skill of the person hosting it, as when self-hosting you can avoid a lot of bad practices some hosts do (mainly the shittier ones)
"Inexpensive is a key word."
Yup, you drop an offline UUID in the aternos world and it shows the player who it belongs.
It seems aternos might indirectly support offline mode
Compares it aginst a know players that joined, maybe?
My server will never be run in offline mode.
Good
Pretty much any server can have that feature, there is just no need for it.
They maybe have got a database
Which logs all offline users and their UUIDs, indirectly supporting offline mode
Yeah, but then it isn't a real UUID, which could cause problems.
Yeah ofc
I mean I can understand only one reason for piracy and that's the "try before you buy" reason. Any other reason is just ridiculous.
Why can't people offer demos anymore?
When I was like 12 my dad thought Minecraft was a massive scam and even when he knew they didn't scam anyone he thought they would scam him specifically so that is another possible reason to sail the seas.
It seems to be a forbidden practice these days.
SHAREWARE.
Mc bedrock has a demo
SHAREWARE NEEDS TO BE A THING AGAIN.
Wube software is a true gigachad in this matter, they've got a nice demo and a great game.
Limited playtime but yeah it's good enough to start understanding the game
java used to have a free trial, idk if they still do
but bedrock AND java are the same account now ... so i would assume so
No I don't think so
there is no?
just looked it up, they do
single player limited play
well, it's a demo, that's kinda what is expected from it
i mean yeah.. but thats how it exists lol
Always ask this community for hosting provider in #marketplacen
I think people need to get together and make a multithreaded MC hosting software.
No way lol
There's one going on but it's a fork of paper
That includes forge.
There's no way Mojang will want to multithread their game lmao
i dont think u understand how minecraft works... its not the host... its the game
They would have to touch so much shit, they would have to redo the game from the ground up
they already have.. its called bedrock.
Mod compatibility would be messed up
Bedrock bad
the entire reason bedrock exists is because java is shit.
I've seen dedicated fans get together and remake a game specifically for modern hardware. Black Mesa.
Well there's some mods that attempt to multithread the game but they're a lil risky
java is only being upkept because of the community
there is not much need for it anyways, if u had proper hardware and optimization you would at some point be limited by the player count and not hardware
I think that was done with the permission of Valve, as Valve is a cool company and allows people to do that and even publish it with a price.
this is exactly what paper aims to do... folia.
They said for modded too
Also, do you know how multithreading actually works?
he doesnt
clearly
Yup.
I do.
well you dont understand how minecraft works then
can tell by looking at the this topic.
Multithreading is being able to line up more than one task for a given CPU.
So then you understand it's simply not really possible for multiple reasons (mainly for me every time I work with multiple threads are race conditions)
Which means you can simulate someting, but a lot of stuff has to stay at the single thread
What tasks will you be lining up?
Now that you mention it that could be the entire problem.
Although paper is epic and does world gen async iirc
I belive it is partially still done with a single thread, that manages the world gen (eg. "hey, load this chunk at x x here") and just the actual generation is done async
to answer your question.
no crazy jvm arguments wont solve this.
You will need some modded server platform that aims to push as many resources off the main thread.
rn paper (and its forks) is your best bet for vanilla+plugins, fabric your best bet for modded.
you're issue tho is clearly your host and or the server platform ur using.
there is no magic keyword u type to fix this
I don't think they'll want to move out of forge but yeah
Oh yeah it was chunk load right?
Well forge is where most of the mods I use actually live.
The one that was async
forge is poorly optimized compared to its competitors... you're rn at a point of just getting the fastest single core cpu, and making sure u got a nice ssd
Are you sure you're not thinking of minecraft classic?
minecraft classic was still in java
they didnt call it minecraft java tho
but they still have free trials
minecraft java has 100minutes free trial rn
You can do a spark report to see the lag reasons
Asking how to multithread Minecraft is an xy question
how do i make my car go to the moon? what button do i press on the dash?
Ad astra
Right, yes. I didn't think Java has ever had a demo mode, but a lot of people treated classic as a demo back in the beta days.
MCMT does not work at all sadly.
iirc, the full version was available for the free trial, it was for like 2 weeks? i think? it might have been singleplayer only, i dont remember it was over a decade ago
Spark report
!spark
Spark Profiler
Spark can be used to see why your server or client is lagging.
https://spark.lucko.me/
Admincraft Canned Responses
Yes, most multi threaded implementations suck or break many things.
Minecraft wasn't originally designed to be compatible with multiple threads.
Try to see what's lagging and maybe don't use contabo next time & ask on #marketplace 🙏🙏🙏
I've heard contabo is not so good
well sorta, stuff like paper multithreads a lot of stuff like chunk loading
it doesnt work like that sadly
I'm no coding expert but I think you'll need to rewrite a lot of the code
but you can't get the code legally ?
or something like that
GitHub
GitHub - Minestom/Minestom: 1.19.3 Lightweight Minecraft server
1.19.3 Lightweight Minecraft server. Contribute to Minestom/Minestom development by creating an account on GitHub.
Yeahh
Well, there is a lot of code that can't be rewritten anyways because it would introduce a lot of issues that are either unsolvable or would be a waste of time to solve.
Best option is like what minestorm did
Full rewrite
folia exists
tho its not ready for server owners to use yet
well he wants forge
then they are SOL
SOL?
Sh*t outta luck
Fun fact sol means sun in Spanish
isnt sol a greek god or something
Idk