Problem FTB Ultimate 1.1.2 Server Lag

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Chad M

New Member
Jul 29, 2019
2
0
0
I've been attempting to get a server going for a couple of friends and I but when I start up my server a connect to it there is a large amount of lag. The chunks load quickly but when I destroy blocks they will sometimes reappear and when I take damage the health bar will not change for a couple seconds. It is still possible to play but this lag makes it very annoying. The terminal also repeatedly prints that the system cannot keep up even though the server gui says that only 6% of memory is being used.

Computer Specs:
  • 2011 MacBook Pro
  • 4gb RAM
  • 2.4 GHz Intel Core i5 Processor
Server is being ran with 2.5 gb ram and my speeds are 40 mb/s download, 12 mbs/s upload, and 15 ms ping.
I've done quite a bit of searching already and have yet to find something that works. Any help/information would be much appreciated.
 

TomPunch

New Member
Jul 29, 2019
6
0
0
I am having the same issue even after allocating additional memory for my server. It is frustrating.

Please let me know if you discover a fix.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Welcome to the world of hosting your own server. Now on to some stuff.

Your issue has nothing to do with your ram. It has to do with your processor and bad minecraft code. Minecraft itself is not coded natively to do much of anything with multithreading and multiprocessors. You can have the best 8 core on the market and it won't mean jack squat when running minecraft. Even worse, when you run a server from a low end (even a low end i5/i7) you will experience strange lag that just shouldn't be there.

This mostly just becomes an issue with modded minecraft, as the inefficient code works fine until you start adding things to it. Then it's starts to back log and bottleneck.

Some things you can do are to change the arguments passed to java from your start.bat/bh like which garbage collector you use, having large pages enabled, enabling aggressive optimizations or even allowing assertions.

You can find a detailed list @oracles website. I would link it, but I'm on my phone and not home.

Edit: that should say start.bat/sh. Stupid fone :p
 

Chad M

New Member
Jul 29, 2019
2
0
0
@Eyemaz
Thanks for the information. I know very little about Java so any additional information about how to change the garbage collector being used would be very helpful.
Using the information you gave me I researched more and found this code:

java -d64 -Xmx2048M -Xms2048M -Djline.terminal=jline.UnsupportedTerminal -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -Djava.awt.headless=true -jar "ftbserver.jar" nogui

This actually helped my server a great deal. The lag I was experiencing was greatly reduced. @TomPunch I would recommend trying this code as well.
However, I have no idea what any of this actually does so if there is anything unnecessary in it or any way it could be improved then please let me know.
 
  • Like
Reactions: Eyamaz