[FIXED] Massive delays on SP servers (up to 5 minutes)

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • 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

Macchiavelli

New Member
Jul 29, 2019
10
0
0
So I recently reinstalled FTB Infinity and modified it a lot, but during the process of adding mods I noticed something strange and extremely annoying:

For some reason my Singleplayer Worlds are running behind by hundreds of seconds, which leads to the following issues:
-Chunk generation can take minutes
-opening Inventory can take up to a minute
-NPCs don´t move at all
-I can´t interact with the world by any means (except for breaking and placing blocks)

This is, what I find in the console sometimes (upon loading a save):

The server is lagging 444367 ms behind, 7887 ticks will be skipped


(these values do vary, I just copy-pasted the last time this happened)

I dont think, that it´s the huge load of mods that i´m currently loading (~450), as this issue already occured with
FTB Infinity + Galacticraft + Galaxyspace + AmunRa
 

Macchiavelli

New Member
Jul 29, 2019
10
0
0
CPU: Intel I7 4790k
GPU: Nvidia GTX 960
16 GB Ram (14GB allocated)
EDIT: Win 10
anything else?

And 450 mods is quite a few.

Yeah, I know I just kept adding Mods and tweaked things when they broke until they didn´t.
I´m currently testing the playability :D
 

erindalc

Popular Member
Mar 3, 2015
992
512
109
Steam
CPU: Intel I7 4790k
GPU: Nvidia GTX 960
16 GB Ram (14GB allocated)
anything else?

Yeah, I know I just kept adding Mods and tweaked things when they broke until they didn´t.
I´m currently testing the playability :D

14 GB might actually be too much ,as allocated too much ram can cause java to slow down. A few more questions:

Are you using an SSD or HDD?
What version of Java are you running?
Are you using any start up parameters besides ram allocation?
Does the lag happen all the time or when you make a new world/are exploring a new area?
Which launcher are you using?
What are your video settings?
Are you using a texture pack?
 

Macchiavelli

New Member
Jul 29, 2019
10
0
0
SSD
Idk, where can I look it up? (I guess 7 or 8 ^^)
More altered launcher options? No
All the time so far (In first tests it seems to have gone away when exploring GC planets)
FTB-Launcher
highest possible
not yet, i wanted to go for Invictus (or Soaetex Fanver, based on which one covers more of my mods)
 

erindalc

Popular Member
Mar 3, 2015
992
512
109
Steam
Find your version of Java here
I would try lowering your ram a bit to see if it helps, lowering your video settings, and I would also try reducing the number of mods you have (especially mods that add mobs to the Overworld).
 

Macchiavelli

New Member
Jul 29, 2019
10
0
0
okay so I´m running Java 8

What amount of ram would you recommend?
What Video settings are the most important ones?

And i only have rather few mods that add new mobs,
but I guess my modpack will shrink anyways from now on, due to plenty of unfixable crashes,
that will occur sooner or later :D
 

erindalc

Popular Member
Mar 3, 2015
992
512
109
Steam
I'd recommend 4 GB of ram to start, and add .5 GB at a time if you need it

As for video settings:
Vsync: varies, try both settings
Render Distance: 6-10 is best for me
Fancy/Fast Graphics: Try fast for a while
Smooth Lighting: Not sure if it's in 1.7.10, but try turning in minimum. It's hard to notice the difference, but there's a big performance impact.

Those are the ones I remember of the top of my head that are super important, what they all do is here

I think the most important thing to do is take out some mods you aren't using. The game tends to break down when you have too many.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
To tame this beast:

1. Run a dedicated server so you can performance profile the server in isolation.
2. WarmRoast will tell you what mods / routines are using all the cpu for that time.
3. Garbage collection can be your enemy if you have too much memory allocated and/or are using the wrong launch paramters. So
3.1 how much memory is the dedicated server actually using? lower your memory allocation to not be more than double that
3.2 what are the launch parameters you are using? It is crucial to include the correct GC parameters as the defaults are not good for gaming where constant tps are required. Normally " -XX:+ UseConcMarkSweepGC" (which also implies UseParNewGC) is the important parameter.

Badly tuned garbage collection normally gives periodic (every 2-20s) lag (server behind etc) that is "merely" 50-500 ticks behind. So I don't think your issue is GC related.

Badly behaved mods are the next possibility - with that many mods the option is certainly there, but does the problem occur only in the presence of modded "Stuff" or does it happen with "fresh" mostly vanilla worldgen (After youve waited sufficiently long for worldgen to complete?) I'm not sure its this.

Overcomitting memory to java - passing a -xmx that gives Java more memory than you physically have RAM will cause your entire system to run out of memory and lag as it has to page memory to and from disk. As the OS tries to find ram it can easilly stall apps for times in the order of minutes. So given your symptoms, it seems that you are trying to run a pack that is simply using more memory than you have physical RAM.
 
Last edited: