Skip to main content
9 of 17
added 50 characters in body

Cause of TPS/Lag in early game SSP world - Can anyone explain what's happening here?

TLDR:

Newly created 1.14.4 Java SSP world experiences TPS of 6 ms min & 7 ms avg values consistently but after AFK for an extended period of time at AFK fish farm, this increases to around 20 ms min & ms avg of low 20s. Restarting the game (even rebooting the system) does not resolve the issue. But if I move out of the area far enough to unload the chunks then return, the TPS values go back down to 6 ms min & 7 ms avg. Any explanation for this behavior?


Elaboration:

I've noticed increased TPS response times in my SSP game world that is still in the very early stages. It is exhibiting behavior that made me consider posting a question about what is happening to see if anyone can explain what is going on and hopefully help me pinpoint the cause and minimize or eliminate the issue.

With this in mind, I'll try to set the stage by outlining as much about this in hopes that it's all relevant info that will be helpful in resolving the issue:

Minecraft version: Java 1.14.4 (yes, it's old but I've just returned to Minecraft after being away for a long time having last played 1.14.4, so the idea is to ease back into it before advancing to new versions). This is vanilla with no mods though I do have a few minor datapacks (mostly UI/recipe stuff from Vanilla Tweaks or quality of life sorts of things from Planet Minecraft like vein miner/tree capitator).

Biome: Mountains/Wooded Mountains/Taiga. My base is near spawn. This is fairly steep/hilly terrain (not as extreme as amplified worlds but since the game itself makes a point of noting that amplified worlds require a "beefy computer" I thought noting the biome/terrain might be relevant).

World Seed: 2178275020747766804 (for anyone who wanted to check this out... my base is right around: 3, 77, -362).

Builds/Farms/Misc: This is very early game so there's very little thus far:

  • Manual wheat, carrot, potato crop farm (one 9x9 plot w/hydration water block in center).
  • Automatic fish farm (magma block design like shown by wattles in this video).
  • AFK fishing farm(NimsTV design).
  • Small melon/pumpkin farm (one melon and one pumpkin, as shown by OMGChad in this video).
  • Still manually farming large spruce so no tree farm "build" as yet.
  • Storage room (almost exclusively barrels, no item frames, very few signs yet - surprisingly I get about the best FPS/low TPS response times here).
  • Small self-fueling charcoal smelter (4 furnaces, hoppers, comparators, 2 double chests, etc. following EagleEye621's design).
  • Small automatic smelter setup (hoppers, barrels, 4 Smokers, 4 Furnaces, 1 Blast Furnace).
  • 3 campfires (to augment the above smelters).
  • Small egg farm (10 chickens) that I migrated to a classic 1x1 space chicken farm design (24 egg laying chickens, ~3-5 baby chickens at any one time). This was shown by OMGChad (among others) in this video (though I replaced the redstone with an observer based clock).
  • Caving and starter branch mine.
  • Mobs: I have 2 tamed horses near the base and there are a few cows, sheep, lamas wandering around within 128 blocks. Additionally, on a number of occasions a number of bands of pillagers have gone through the area where they seem to hang around indefinitely unless I take them out or despawn them by moving far enough away. As far as I'm aware there are no villages within 128 blocks. Also a river biome snakes through the area so salmon and squid frequently spawn at normal, ordinary rates.
  • I've also built a portal and visited the nether and found a nether fortress (very near my portal in the nether). But this is all very early and nothing much has been done yet other than get a few blaze rods, some nether quartz and some magma blocks. Have not been to the end yet.
  • I've tried to minimize the use of redstone dust/wire. I believe all I have is 2 redstone dots in the self-fueling charcoal smelter and 4 redstone dotes in the melon/pumpkin farm. Further I've surrounded all redstone with blocks to minimize light updates.

Settings/Optimization/System:

  • Render Distance: 12 chunks
  • Max Framerate: Unlimited (can usually get between 100-500 fps)
  • Graphics: Fast
  • Particles: Decreased
  • OptiFine: HD_U_G5
  • Minecraft is all that I'm running. No other programs are running and I've minimized the number of programs that start on Windows boot. Also, I've had the Task Manager up and have observed no unusual spikes on CPU or RAM utilization.
  • My system has 32 GB RAM, Minecraft is configured with 4GB dedicated to it.

Observed behavior:

The whole point of listing all this is to show just how low impact all this is and how truly early, early game it is so you wouldn't expect any of the classic drop in performance that often occurs in worlds that have been played in for a long time with lots of build up, farms, redstone, etc. Indeed, when I spawned in the new world the values displayed in the TPS graph (Alt+F3) in lower right showed 6 ms min & 7 ms avg values consistently. I'd even see 5 ms min and possibly occasionally 4 ms min. So as far as I'm concerned, this is all quite reasonable performance. No problems at all playing at these levels. After doing the above builds I consistently get around 8 ms min & 9 ms avg values. This too is very reasonable performance and understandable given the builds and mobs in the area so absolutely nothing to complain about or be concerned over in the least.

But now is the behavior I'm curious about. When I AFK at my AFK fish farm multiple hours (i.e. 3-8), I've come back to see the TPS values of 20 ms min & ms avg values in the low 20s. This also is a playable level of performance so I'm not complaining (though it does start to be noticeable), but I'm curious why this happens when all I've done is AFK at my fish farm for an extended period of time. Further, as far as I can tell there isn't a build up of pillagers hanging around in the area and also nothing else has changed. However, this performance continues at those levels even if I quit and restart the game. BUT... if I move out of the area far enough away to unload the chunks and then return, performance returns to previous levels of 8 ms min & 9 ms avg values.

A few other things to note. First time this happened, I switched to spectator mode and flew out of the area. The 20 ms min performance continued but as soon as I switched to creative mode, TPS dropped back down to 8 ms min & 9 ms avg values. Further, this is not the first time I've played from the start using this seed. I noticed this earlier and so since it was so early in the world I thought I'd start over and play the entire time with Alt+F3 screen open to see if there was any point where something I did started causing a performance drop. But I didn't see anything until running AFK at my fish farm for an extended period of time.

So to me, this is a bit of a mystery regarding what's happening in the first place and why moving out of the area resolves the issue. My only guess would be a build up of mob entities like pillagers that don't despawn during the day and that (at least in my observation) once in the area seem to hang around. In both of my playthroughs I noticed multiple pillager parties enter the area and hang around but it wasn't excessive (at most only 2 parties).

Helpful Info:

This post was been particularly helpful in getting me a little more knowledgeable on TPS, MSTP, etc.:

but even so I'm somewhat at a loss to explain the behavior I've outlined.

Other resources like the following have also been helpful:

Lagbusting video series by xisumavoid and others notwithstanding, most information I've found seems to center around your computer hardware and configuration settings, tweaks, etc. like this example:

While definitely part of this equation, this doesn't seem to me to really address issues like the classic situation I noted earlier where performance degrades over time as farms, builds, etc. increase in the world. To me, I am keenly interested in being informed about how to select builds and design things in ways that minimizes the amount of load it introduces to the system. This includes avoiding/minimizing usage of certain blocks as well as knowing what Minecraft Java versions are more optimized, among many other applicable things. It is deeply frustrating (and concerning) to think of spending a lot of effort on a world only for it to become more laggy and then not being knowledgeable enough to troubleshoot and address the issue.