1.10.2 Packs Unknown Server Lag

Bloody_Wicklow

New Member
Jul 29, 2019
8
0
0
OS: Windows 7 Professional
Server: Running on personal computer/local host for other computers in my home. Also running a client off of the same machine
FTB Version: 1.4.12
Add mods to server pack? No
Server Specs:
Intel Core i7-4790K 4.00 GHZ
32 GB installed memory (currently allocating default to server)
NVIDIA GeForce GTX 960
Samsung SSD 850 EVO 250GB
Connecting through Ethernet to router

On both Direwolf20 1.10.2 pack version 1.2.2 and Skyfactory 1.10.2 pack version 3.0.5 I have set up servers to run on my local network. In both cases, there are consistent server lag spikes, almost as though the server is skipping ticks, but there are no skipping ticks reported in the server logs.

On the two computers accessing the server through the client (including the computer running the server and the client) there is no visible lag. However, when watching the other players move, their characters jump/pause/jump/pause. Also when attacking monsters there is noticeable lag on the client side for example creepers exploding without notice. I have tried adding additional memory to my server, but that doesn't seem to have an affect. My CPU is running around 60% capacity on average.

An additional note is that I have been running servers for agrarian skies, DW20 for both 1.7 and 1.6 MC versions without any issues at all. I also replaced my modem/router with a brand new one from my internet provided and no change to the lag was observed.
 

Henry Link

Popular Member
Dec 23, 2012
2,601
553
128
USA - East Coast
have you tried to edit the java arguments yet? You may want to take a look at https://www.reddit.com/r/feedthebeast/comments/5jhuk9/modded_mc_and_memory_usage_a_history_with_a/ to get a good explination of some. Since you have 32 GB I would run the server and client at around 5 to 6 GB each.

What I think you are seeing is a slight lag when the java garbage collector runs. Which means run it more frequently so it doesn't cause a lot of spikes. See that article above for some info on that as well.
 

Bloody_Wicklow

New Member
Jul 29, 2019
8
0
0
Tested the server more. Changing parameters hasn't corrected the skipping. Monsters and players still "jerk" around the screen.

I read somewhere that it may have to do with hostile monsters spawning? Or if anyone else has suggestions on ideal java parameters for 1.10.2 DW20 or SF3 packs, I'll be happy to see if my performance improves.

I cannot be the only person experiencing this problem, My computer is highly capable and my connections are top notch for residential. I would be nice if the server files came with working java parameters already...
 

Henry Link

Popular Member
Dec 23, 2012
2,601
553
128
USA - East Coast
Are you sure it is server side? Some of those effects can be client side as well. A couple things to look for to give you some ideas of where the problem is at.
  • On the server console type in /forge tps See what the report tells you. You should get a steady 20 TPS that is under 50ms. When the processing time goes over 50ms you will see a drop in TPS from the server and it could be causing your issue. You will also "Can't Keep Up" warning messages in the console.
  • Keep an eye on the task manager. Specifically how much CPU & mem is java using? Is it saturating one of the CPU cores when you see the rubber banding effect? Keep in mind that minecraft is still a single thread process and must run on one core.
If you don't see any issue with the above you should start looking at the clients instead of the server.
 

Bloody_Wicklow

New Member
Jul 29, 2019
8
0
0
I've experimented with some changes to see if anything improved.

I switched from the FTB launcher to the curse launcher for client
I am now running SF3 3.0.6
I have tried a variety of java parameters

No effect from those changes.

On the server console when I type in /forge tps, most of the time it is running 20-25ms, but sometimes the overall mean tick time exceeds 100 ms.

I am occasionally seeing the "cant' keep up" warning message. These occurrences seem to align with spikes to 100% usage on a CPU core. Most of the time that core is running around 90%. My memory consumption is at 7G for client and 4G for client. I assigned 6G to both client and server, so I am not sure how/why the client is running at 7G.

When I run the server without running the client, the core usage drops significantly. It looks like my computer run both the client and the server on the same core? is there a way to separate them to run on different cores?
 

Bloody_Wicklow

New Member
Jul 29, 2019
8
0
0
I figured out my problem. To make a long story short, I have been running all of my localhost servers from the forge.jar file instead of the server.bat file. I haven't tested this on all of the different packs yet, but with a brand new Agrarian Skies 2 server. The forge.jar causes all 8 cores on my CPU to run and around 40%. By running the server from the server.bat file, 4 of my cores are "parked" and the remaining 4 cores cause my CPU to run less than 10%.

I think this is caused from watching (apparently obvious now) improper youtube tutorial on setting up a FTB server and have been doing it wrong ever since. I am very happy that I have figured this out. It was a mystery to me that I would have a really solid computer and minecraft was having trouble running.

For anyone else reading this... MAKE SURE TO RUN YOUR SERVER FROM THE .bat FILE, NOT the forge.jar FILE!!!!

I will test this on more demanding servers like DW20 1.10 and SF3, but I don't anticipate any more problems. If problems arise, I will post below. Otherwise... case closed.