1

MC Server optimisation

iGPR 1/27/24 5:16 am
1.3k
1/28/2024 10:09 am
Hi there. Recently I started hosting a server with my old PC components and my friends say it’s running pretty slow. The server has 16GB RAM, an i5-10400 (which should be plenty), 50mpbs upload, and it’s running on Forge 1.20.4 with a few datapacks. I think it has 8GB allocated at the moment, but I might have to increase it.

After searching for a bit, some people suggested allocating 12GB to it, even though it won’t need that much, it’ll give it the headroom to breathe.

I’d like to run ~18 chunks and at most 6 people play it. Any help appreciated.
Posted by
iGPR
Level 1 : New Miner
0

  Have something to say?

JoinSign in

7

E14L
01/28/2024 10:03 am
Level 24 : Expert Imposter
Hi
2
iGPR
01/28/2024 10:09 am
Level 1 : New Miner
hi
1
Espercroft
01/27/2024 7:06 am
Level 12 : Journeyman Healer
history
first you should be getting the specifics on what could be slowing down the server using a lag profiler.


go install spark, and as soon as you play on the server, do /spark profiler start
this will record everything that contributes to the slowdown of your server.



after some time (preferably 10 minutes), do /spark profiler stop
a web link will then appear on the chat. it will lead to a viewable list of
stuff that has caused some load on your server.


share the profiler link here so that i could analyze it.
1
iGPR
01/27/2024 11:58 am
Level 1 : New Miner
history
Ok! Here's the link:

spark.lucko.me/js4ei0ivAX

Server gets 180mpbs down, 50 up.

My PC gets 70 down, 50 up too.

Me and my friend are randomly disconnected partway through, probably about 5 mins in. Sometimes the lag was so bad you couldn't even hit mobs, sometimes it was perfectly fine. Didn't have this issue yesterday, but today I created a new playit.gg tunnel for port forwarding, as I had to reset windows when putting in a new SSD. If it makes any difference the old playit ip was a completely different port, 48906 and now 13489.

I've allocated 10GB RAM to it as of now, and brought the render distance back down to 14 chunks for these tests. Otherwise, yesterday, the server was running on 6GB and 14 chunks as well.
1
Espercroft
01/27/2024 2:14 pm
Level 12 : Journeyman Healer
history
take a look at the timings you posted. there are two things that strike odd to me.

Firstly, spark reports that the server had only 2.8GB of ram to work with which was not the 8GB that you reported.

Secondly, spark reports that the server is running as smooth as butter (20tps) throughout the 14 minutes of profiling.



That being said, if the server is not slowing down then the network connection itself would appear to be the issue here.

though i'm no help when it comes to network issues...
1
iGPR
01/28/2024 9:50 am
Level 1 : New Miner
history
So, server runs on 1.20.0 now. Couldn't downgrade without awful world errors so we started fresh. I made a post about an error (java.net.SocketException : Connection Reset) I'm getting here if you could take a look. Thanks!

  www.planetminecraft.com/forums/help/servers/java-net-socketexception-connection-reset-error-681195/
1
iGPR
01/27/2024 2:32 pm
Level 1 : New Miner
history
Yeah, it's probably a network issue.

In the MC server panel, it shows that it uses more than 2.8GB sometimes, so I think it's just an issue with reporting the RAM usage. The graph on there shows 25% RAM free for example, but it isn't accurate at all. When using 1GB it says 30% free and also when using over 2. I think it does have the allocated RAM to work with but won't report it properly.

A datapack I'm using isn't compatible with 1.20.4 anyways, so I'm going to have to downgrade to 1.20.0, despite it being listed as 1.20.x. Once I get the 1.20.0 server running I'll send you a spark report again and see if it works as well.
1

Welcome