Problem Direwolf20 1.4.7 Server laggy runing on a dedicated PC

  • 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

CodeMaestro

New Member
Jul 29, 2019
1
0
0
So I'm running a Direwolf20 1.4.7 Server for me and a few friends (up to 4 people including me) on an unused PC at my house. We have been plagued by constant block lag and a relatively high world tick rate that increases with the number of people on the server. The PC that the server is running on has an i7-2600, 8GB of dual-channel DDR3 RAM, and is Running Windows 7 Ultimate. I have allowed the server to use up to 6GB of RAM with the following arguments in the launcher .bat file:

java -Xms1024M -Xmx6G -jar ftbserver.jar

I never notice the usage on any of the 4 cores being used go much above 70% usage, even under especially heavy server loads. In addition, the total memory usage never comes close to 6GB (more like 2 tops). Also, I do have the latest version of 64-bit java.


Any ideas are greatly appreciated!
 

sprenger

New Member
Jul 29, 2019
2
0
0
Hi,
you should tweak your Java parameters a bit here. Firstly: the garbage collector runs when a certain level of heap usage is reached (correct me if I'm wrong here). So because of this and the fact that the DW20 pack uses more than 1gig of ram on startup Java increases the heap size only by 100mb steps which leads to 90% heap usage and constant garbage collecting and lagging. In short:

Try something like this

java -server -Xms3072m -Xmx2048m -XX:permSize=256m -XX:NewRatio=3 -XX:SurvivorRatio=3 -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=8 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=10 -XX:GCPauseIntervalMillis=50 -XX:MaxGCMinorPauseMillis=7 -XX:+ExplicitGCInvokesConcurrent -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+BindGCTaskThreadsToCPUs -Xnoclassgc -jar ftbserver.jar

Replace the parameter with the :p with -XX: PermSize=256m (without the space)
(If your client is laggy too i can recomment this thread)