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
Admincraft Meta
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
Pantheris
PantherisOP2y ago
Server is a Contabo-hosted Ubuntu blank-slate VPS I set up myself with PufferPanel.
Discount Milk
Discount Milk2y ago
Minecraft is a primarily single threaded game. There is no way to do what you're asking.
Pantheris
PantherisOP2y ago
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.
Lunaiskey
Lunaiskey2y ago
contabo is hot garbage for minecraft servers, or really for anything
Pantheris
PantherisOP2y ago
Not from my experience.
Discount Milk
Discount Milk2y ago
Yeah that doesn't mean minecraft can utilize it. Lucky previous experience, but that doesn't mean maven is wrong.
Pantheris
PantherisOP2y ago
Lucky current experience. I still use it.
Discount Milk
Discount Milk2y ago
You're complaining about performance problems while denying that contabo has performance limitations..
Pantheris
PantherisOP2y ago
Any server has limitations. It's just how HIGH those limitations are.
Discount Milk
Discount Milk2y ago
That's obviously not what I meant.
Pantheris
PantherisOP2y ago
I tried Sparkhost, garbage. GGservers, garbage (and overpriced for their supreme tier.)
Lunaiskey
Lunaiskey2y ago
minecraft mostly isnt multi threaded, using flags to enable parallelization isnt going to force it to be multi threaded
Pantheris
PantherisOP2y ago
Believe it or not, Contabo is the ONLY SERVER I have managed to squeeze a lot of performance out of.
ProGamingDk
ProGamingDk2y ago
ok get a good trusted host that uses a new ryzen cpu, and optimise the mods using most of the main thread
Pantheris
PantherisOP2y ago
The server I'm running has a Ryzen 7000-series
Discount Milk
Discount Milk2y ago
Not an oversold one
Pantheris
PantherisOP2y ago
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
Discount Milk
Discount Milk2y ago
Don't give minecraft more than 12GB of heap, it almost never will need it.
Pantheris
PantherisOP2y ago
._. I'm running modded?
bd
bd2y ago
listed garbage. ofc they’re garbage
Discount Milk
Discount Milk2y ago
Even modded
Pantheris
PantherisOP2y ago
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.
bd
bd2y ago
you haven’t tried many other viable options then
Pantheris
PantherisOP2y ago
Most other viable options are unavailable to me due to budgeting reasons. AND DO NOT SAY ATERNOS. THEIR INTERFACE SUCKS.
Discount Milk
Discount Milk2y ago
Well we aren't suggesting you to switch from garbage... To garbage..
ProGamingDk
ProGamingDk2y ago
noone would recommend or tell u to use aternos
Discount Milk
Discount Milk2y ago
Check the hosts in #marketplace
ProGamingDk
ProGamingDk2y ago
atleast here
1who¡ssus?
1who¡ssus?2y ago
We already know aternos sucks
bd
bd2y ago
that’s crazy that the immediate reaction was “DONT SAY ATERNOS”
luketeam5
luketeam52y ago
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
bd
bd2y ago
shills ¯\_(ツ)_/¯
Pantheris
PantherisOP2y ago
Aternos can go suck an egg.
luketeam5
luketeam52y ago
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.
1who¡ssus?
1who¡ssus?2y ago
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
luketeam5
luketeam52y ago
I said praise (eg. omg look Aternos added a thing that even other free hosts had for ages)
Pantheris
PantherisOP2y ago
I can set up servers using BASH SHELL! 😄
bd
bd2y ago
back to the topic at hand though. iirc, there are jars coming close to multi threading, but it’s not traditional multi threading?
1who¡ssus?
1who¡ssus?2y ago
Although a hosting will always be better than selfhosting 🙏 what was your budget? Just wondering.
ProGamingDk
ProGamingDk2y ago
hes on modded
bd
bd2y ago
word
1who¡ssus?
1who¡ssus?2y ago
Aternos can be used to get the owner of offline UUIDs
ProGamingDk
ProGamingDk2y ago
?
luketeam5
luketeam52y ago
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)
Pantheris
PantherisOP2y ago
"Inexpensive is a key word."
1who¡ssus?
1who¡ssus?2y ago
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
luketeam5
luketeam52y ago
Compares it aginst a know players that joined, maybe?
Pantheris
PantherisOP2y ago
My server will never be run in offline mode.
1who¡ssus?
1who¡ssus?2y ago
Good
luketeam5
luketeam52y ago
Pretty much any server can have that feature, there is just no need for it.
1who¡ssus?
1who¡ssus?2y ago
They maybe have got a database Which logs all offline users and their UUIDs, indirectly supporting offline mode
luketeam5
luketeam52y ago
Yeah, but then it isn't a real UUID, which could cause problems.
1who¡ssus?
1who¡ssus?2y ago
Yeah ofc
Pantheris
PantherisOP2y ago
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?
luketeam5
luketeam52y ago
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.
Pantheris
PantherisOP2y ago
It seems to be a forbidden practice these days. SHAREWARE.
1who¡ssus?
1who¡ssus?2y ago
Mc bedrock has a demo
Pantheris
PantherisOP2y ago
SHAREWARE NEEDS TO BE A THING AGAIN.
luketeam5
luketeam52y ago
Wube software is a true gigachad in this matter, they've got a nice demo and a great game.
1who¡ssus?
1who¡ssus?2y ago
Limited playtime but yeah it's good enough to start understanding the game
QarthO
QarthO2y ago
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
1who¡ssus?
1who¡ssus?2y ago
No I don't think so
bd
bd2y ago
there is no?
QarthO
QarthO2y ago
just looked it up, they do
bd
bd2y ago
single player limited play
luketeam5
luketeam52y ago
well, it's a demo, that's kinda what is expected from it
bd
bd2y ago
i mean yeah.. but thats how it exists lol
1who¡ssus?
1who¡ssus?2y ago
Always ask this community for hosting provider in #marketplacen
Pantheris
PantherisOP2y ago
I think people need to get together and make a multithreaded MC hosting software.
1who¡ssus?
1who¡ssus?2y ago
No way lol There's one going on but it's a fork of paper
Pantheris
PantherisOP2y ago
That includes forge.
1who¡ssus?
1who¡ssus?2y ago
There's no way Mojang will want to multithread their game lmao
QarthO
QarthO2y ago
i dont think u understand how minecraft works... its not the host... its the game
1who¡ssus?
1who¡ssus?2y ago
They would have to touch so much shit, they would have to redo the game from the ground up
QarthO
QarthO2y ago
they already have.. its called bedrock.
1who¡ssus?
1who¡ssus?2y ago
Mod compatibility would be messed up Bedrock bad
QarthO
QarthO2y ago
the entire reason bedrock exists is because java is shit.
Pantheris
PantherisOP2y ago
I've seen dedicated fans get together and remake a game specifically for modern hardware. Black Mesa.
1who¡ssus?
1who¡ssus?2y ago
Well there's some mods that attempt to multithread the game but they're a lil risky
QarthO
QarthO2y ago
java is only being upkept because of the community
ProGamingDk
ProGamingDk2y ago
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
luketeam5
luketeam52y ago
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.
QarthO
QarthO2y ago
this is exactly what paper aims to do... folia.
1who¡ssus?
1who¡ssus?2y ago
They said for modded too
luketeam5
luketeam52y ago
Also, do you know how multithreading actually works?
QarthO
QarthO2y ago
he doesnt clearly
Pantheris
PantherisOP2y ago
Yup. I do.
QarthO
QarthO2y ago
well you dont understand how minecraft works then can tell by looking at the this topic.
Pantheris
PantherisOP2y ago
Multithreading is being able to line up more than one task for a given CPU.
luketeam5
luketeam52y ago
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
1who¡ssus?
1who¡ssus?2y ago
What tasks will you be lining up?
Pantheris
PantherisOP2y ago
Now that you mention it that could be the entire problem.
1who¡ssus?
1who¡ssus?2y ago
Although paper is epic and does world gen async iirc
luketeam5
luketeam52y ago
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
QarthO
QarthO2y ago
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
1who¡ssus?
1who¡ssus?2y ago
I don't think they'll want to move out of forge but yeah Oh yeah it was chunk load right?
Pantheris
PantherisOP2y ago
Well forge is where most of the mods I use actually live.
1who¡ssus?
1who¡ssus?2y ago
The one that was async
QarthO
QarthO2y ago
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
Discount Milk
Discount Milk2y ago
Are you sure you're not thinking of minecraft classic?
QarthO
QarthO2y ago
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
1who¡ssus?
1who¡ssus?2y ago
You can do a spark report to see the lag reasons Asking how to multithread Minecraft is an xy question
QarthO
QarthO2y ago
how do i make my car go to the moon? what button do i press on the dash?
1who¡ssus?
1who¡ssus?2y ago
Ad astra
Discount Milk
Discount Milk2y ago
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.
Pantheris
PantherisOP2y ago
MCMT does not work at all sadly.
QarthO
QarthO2y ago
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
1who¡ssus?
1who¡ssus?2y ago
Spark report !spark
Carl-bot
Carl-bot2y ago
Spark Profiler
Spark can be used to see why your server or client is lagging. https://spark.lucko.me/
From An unknown user
Admincraft Canned Responses
Discount Milk
Discount Milk2y ago
Yes, most multi threaded implementations suck or break many things. Minecraft wasn't originally designed to be compatible with multiple threads.
1who¡ssus?
1who¡ssus?2y ago
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
blobfish
blobfish2y ago
well sorta, stuff like paper multithreads a lot of stuff like chunk loading
Zaid
Zaid2y ago
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
snowznz.bak
snowznz.bak2y ago
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.
1who¡ssus?
1who¡ssus?2y ago
Yeahh
luketeam5
luketeam52y ago
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.
1who¡ssus?
1who¡ssus?2y ago
Best option is like what minestorm did Full rewrite
Lunaiskey
Lunaiskey2y ago
folia exists tho its not ready for server owners to use yet
ProGamingDk
ProGamingDk2y ago
well he wants forge
Lunaiskey
Lunaiskey2y ago
then they are SOL
Zaid
Zaid2y ago
SOL?
Discount Milk
Discount Milk2y ago
Sh*t outta luck
1who¡ssus?
1who¡ssus?2y ago
Fun fact sol means sun in Spanish
snowznz.bak
snowznz.bak2y ago
isnt sol a greek god or something
1who¡ssus?
1who¡ssus?2y ago
Idk

Did you find this page helpful?