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

DynamicDark

New Member
Jul 29, 2019
3
0
0
Hi,

I started hosting a server for me and 2 friends to join, so that's a maximum of 3 people at once and there is a lot of server lag. The server is local and runs on my computer. (Specs below)

My specs

Processor: Intel Core i7-3770 (non K) - 3.4 GHz (Turbo Boost up to 3.9 GHz)
RAM: 12 GB DDR3 1600 MHz (4 RAM sticks)
GPU: NVIDIA Geforce GTX 660 (GDDR5, 1 GB memory)
OS: Windows 8

I use the Direwolf20 pack (versions 5.0.1)

I was hoping someone could create a batch file to make the server run better. Also, it would be nice if you could explain what each part of the code is doing just so I know what's happening

Thanks,
 

fetget

New Member
Jul 29, 2019
4
0
0
I got the same problem but on a server, only running FTB server on it, and about 5 players, peak at 12..

Intel i7 3770k, 16GB 1333MHz ram, At first I was thinking it was the processor but its on 20% load.. and the mem is like half used, got limit on minecraft to use 14gb, + paging file on 32gb.., SSD from intel too (w/r 500mb~), pretty sure its the water in the quarry making the lag (every water block got a calculation) but how come java suck so hard and cant use the fully potential of my i7, running windows server 2008 and thinking about trying linux just too see if it runs better?

really annoying lag, downloaded forgebukkit and worldedit to do a //set 0 on the quarry hole and the lag vanished, but still does java suck so hard or can i optimize my run.bat?

java -Xms10240M -Xmx14336M -jar ftbserver.jar nogui -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:UseSSE=4 -XX:+UseFastAccessorMethods -XX:CMSFullGCsBeforeCompaction=1 -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:parallelGCThreads=8

and I got 500Mbit/s (getting about 80%) up and down bandwidth
 

DynamicDark

New Member
Jul 29, 2019
3
0
0
I agree it's really weird how the server can't run good even with really good computer specs.

The code you posted, will that work for me?
 

fetget

New Member
Jul 29, 2019
4
0
0
thats what I use, try it and see if it helps, also changed view distance to 8 in the server.properties
 

fetget

New Member
Jul 29, 2019
4
0
0
Extra Performance Hints For Servers

  • Your start.bat/sh should look something like this (replace 8192 with the RAM the server should be allowed to use, in megabytes):
  • java -server -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:parallelGCThreads=6 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+UseCompressedOops -XX:+AggressiveOpts -Xmx8192M -jar server.jar nogui
  • Replace the "6" in -XX:parallelGCThreads=6 with the number of cores your server has.

from site
 

DynamicDark

New Member
Jul 29, 2019
3
0
0
Well what I would say about the code is that it definitely help. I noticed that the server was laggy everytime I or my friends joined for the first time and gradually it became better and better. If anyone has better codes than please let me know, otherwise that was pretty good.

Thanks,
 

fetget

New Member
Jul 29, 2019
4
0
0
ok nice to hear, Got some more tweaks, you can set the java process to high and I change to an older java, I got version 1.6.0_39 and that seems to have solved my problem =)
 

Energysipher323

New Member
Jul 29, 2019
50
0
0
Are u able to use custom start.bats on demonvps host? And idk if i really.need the code or not so if i dont will it make a bad outcome?