Private Modpack Server Question

  • 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

Xiaminou

New Member
Jul 29, 2019
30
0
0
Hello,

Introduction:
I have been making myself private modpacks for a long time and always ends up lagging my world by building too much. But that does not stop me from restarting, and once again I find myself putting together alot of mods, however this time I am going building with a new goal: to keep the lag down.

My setup:
Hardware:

Desktop (client): i7 950 3.07Ghz, 12GB DDR3
Laptop (server): i7 3610QM 2.3Ghz, 16GB DDR3
Software:
Using the curse launcher I have built a modpack with 226 mods and am running forge 1403 and kcauldron for the server performance.

In-Game:
I have built all of my bases in a void world (The Last Millenium) and put them far enough apart so that I do not render and/or chunkload them all at the same time, I have platforms for mob farms, auto-processing, auto-crafting etc...

The Problem:
Now you might wonder why I'm telling you all that, and you might think that it's going to be about simple TPS lag because of too many mods and at some point you might be right, however right now it is not that simple. My problem is that my server is running on 20 TPS with and overall tick time of 16 to 30ms, however there seems to be a delay for my client. What I experience is hard to explain, it's like I experienced 40 ticks in 1s then nothing the next then 40 ticks. The server runs perfectly fine but there seems to be some kind of problem between it and client. It is still playable and almost seemless if not for the machine's progression bar, I'm just curious to know what could be causing that.



TL: DR (read this if you don't want to read everything):
I am experiencing 2s of server ticks in 1s then nothing for 1s then 2s of server ticks etc...
What could be problem?

EDIT:
I decided to test the TPS timing with actual machines (a timer) instead of trusting the different commands (/cofh tps, /opis, /tps all say 20 TPS) and as it turns out the server is not running at 20 TPS since the timer took 30 seconds for a 20 second loop.
New question: why is the server lying about the TPS?
 
Last edited:

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
how much people are onlina and how much ram did you allocate to the server?
is the log filled with can't keep up messages or other signs off lag?
 

Linkero

New Member
Jul 29, 2019
74
0
0
Seeing as you're using kcauldron, do you have access to the /timings command?

First, do /timings on

Let it go and do what ever you do, then after a few minutes, do /timings paste

Thennnnn /timings off. And share the link.


To me tho, it sounds like your laptop is connected via wireless and its simply a latency issue sort of thing. Another, as its a laptop running the server, you may need to adjust your power management settings for Max performance as by default, power saver mode will throttle down your cpu.

Also, you may not want to rely on machines to measure ticks, as some mods use their own system for ticks. Ie a minecraft tick runs seperately than a mods tick.
 
  • Like
Reactions: lenscas

Xiaminou

New Member
Jul 29, 2019
30
0
0
Seeing as you're using kcauldron, do you have access to the /timings command? [...]

Here is the link : http://timings.aikar.co/?url=11433557.

I didn't know about that command, is it from spigot?

To me tho, it sounds like your laptop is connected via wireless and its simply a latency issue sort of thing. Another, as its a laptop running the server, you may need to adjust your power management settings for Max performance as by default, power saver mode will throttle down your cpu.

It's not, Both the laptop and desktop are wired to my router with 1Gbps. and the laptop is already in max performance, as yes power saving does cut my CPU clock in half, I highly doubt it's a performance issue (not from my part anyway, minecraft... maybe). Once initialized the server uses at most 25% of the CPU and single cores never go over 50%.

Also, you may not want to rely on machines to measure ticks, as some mods use their own system for ticks. Ie a minecraft tick runs seperately than a mods tick.
What I meant by the machine indicating lag is that the progress bar moves for a second, stops for a second and repeat. I'm not relying on machines for the TPS, as I said I used the commands first. However using a timer and timing it IRL is a pretty reliable way to tell if it's lagging.
 

Linkero

New Member
Jul 29, 2019
74
0
0
May I ask what you have managing your world saving? Because that's all I see that could be causing it :/ If you look at "World Save", it's using up over 3000% of a tick, which is why you're only getting(according to the report) 13TPS. Tho, it was only for a short time. To understand the report, just pop over to http://www.spigotmc.org/wiki/timings/ As you guessed, it is indeed a spigot command ;) But, now we can definitely rule out latency! Without knowing your mod list, there are a few possible causes. First, could be one of the mods that has some sort of world save handler doing it. That could be almost anything. A mod list would help with that one. Another could be your harddrives read/write speed, but I personally doubt it. Still, the chance does exist. Until we see a modlist, my suggestion would be to edit your bukkit.yml and edit your autosave to be higher. That way saving isn't as frequent. Additionally, look on bukkit and spigot websites on how to optimize your yml files. That would only be to prevent future lag.

Other than that, your timings look pretty normal to me.
 

Xiaminou

New Member
Jul 29, 2019
30
0
0
I do have aroma doing backups every 5 minutes because I hate to rollback too much, I never suspected it could be the cause of the lag since it only takes 30 seconds, shouldn't it only lag those 30 seconds?

But yeah I came to the same conclusion and am trying without backups.
 

Linkero

New Member
Jul 29, 2019
74
0
0
Here's the thing, you're doing a backup every 5 min. That'd be a full world back up with all the dimensions. Depending on your world size, you could be saving a gig or two of data......every 5 min. The problem here is that during those 30 seconds the world is backing up, the server is also trying to save changes in the world. If your world is saving itself every 30 seconds as well, It's probably too much going on for your harddrive to keep up with. I'd personally expect the same as you, spikes of lag. But it very well could be the cause for constant lag. I haven't used Aroma's backup for a while, but to rule it out, disable it completely and try playing around in the world and see how the lag is. IF it's gone, I would recommend bumping up how often it does backups and try again. IF the lag is back when you do that, unfortunately I'd have to recommend removing it and using a plugin from bukkit/spigot :(
 

Linkero

New Member
Jul 29, 2019
74
0
0
If I were you, I would start going through all my automation processes to see if something is stuck. Very first thing would be ae2 autocrafting. Second would be anything built recent to when the lag started. Make sure there isn't an excess of items laying around on the ground. Additionally, I would disable all my automated systems, and reenable 1 by 1 to see which causes the lag. At the moment, that'd be the only thing I can think that will cause lag like this.

Also, since you're using a laptop, make sure it isn't overheating at all. Most laptops are built to reduce clock speed when overheating as well :/ Just a thought.
 

Xiaminou

New Member
Jul 29, 2019
30
0
0
Yeah it's usually what I end up doing, checking everything one by one, which is why I built most things with an off switch.

To be honest it's the fact that the server was indicating 20 TPS and still lagging, but now that I know for a fact that it's wrong (thanks for the timings command), I'll start working on ways to reduce the lag.

By the way here is the illustration of what I'm talking about:

Server: https://drive.google.com/open?id=0B090g8mHJkCWdGNaSk11R3pRMHM&authuser=0
SSP: https://drive.google.com/open?id=0B090g8mHJkCWbnNCWVlyZkZWMm8&authuser=0

see how the progress bars on the server just freeze?
 
Last edited:

Linkero

New Member
Jul 29, 2019
74
0
0
I'm glad you were able to pin it down! I do high suggest you look into optimizing your yml files for the server to reduce some load. That way, when you run your ore processing it'll hopefully be a bit smoother. Unfortunately I never used mekanism so I can't suggest any config changes for performance.

Alas, glad I was able to help, good luck and have fun!


Side note: you may have better luck/performance using your desktop as server and laptop as client