**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][1] 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][2]).
 - AFK fishing farm([NimsTV design][3]).
 - Small melon/pumpkin farm (one melon and one pumpkin, as shown by OMGChad in [this video][4]).
 - 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][5]).
 - 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][6] (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, chickens, wolves, and foxes 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 dots in the melon/pumpkin farm and the short redstone line in the AFK fish farm.  Further I've surrounded all redstone with blocks to minimize light updates.  Further, these machines are usually idle and even when in use, none of them cycle power states quickly but instead are all infrequent.

**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.:

 - [How can I find the cause of lag in my singleplayer world in Minecraft?][7]

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:

 - [How to make redstone devices less laggy][8]
 - [What causes the most lag?][9]
 - [Blocks that cause FPS lag][10]
 - [What game mechanics in Minecraft cause lag?][11]
 - [This ilmango video][12]

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

 - [How to Boost Your FPS and Reduce Lag in Minecraft][14]

While definitely part of the 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 in-game 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.


  [1]: https://vanillatweaks.net/picker/datapacks/
  [2]: https://youtu.be/mr-oKE6PRXc?list=PLeG61A74BJvIu8G4sv2gM-Ce8OBBxHtUU&t=466
  [3]: https://youtu.be/ODG3Sw4fAtU?t=131
  [4]: https://youtu.be/ksoozUXrxeQ?t=47
  [5]: https://youtu.be/qqNPkA3oDqo
  [6]: https://youtu.be/ksoozUXrxeQ?t=1057
  [7]: https://gaming.stackexchange.com/questions/367062/how-can-i-find-the-cause-of-lag-in-my-singleplayer-world-in-minecraft
  [8]: https://www.planetminecraft.com/blog/how-to-make-redstone-devices-less-laggy/
  [9]: https://www.reddit.com/r/Minecraft/comments/a6tigs/what_causes_the_most_lag/
  [10]: https://www.reddit.com/r/technicalminecraft/comments/s3ue3s/blocks_that_cause_fps_lag/
  [11]: https://gaming.stackexchange.com/questions/112123/what-game-mechanics-in-minecraft-cause-lag
  [12]: https://www.youtube.com/watch?v=juydwDVB17g
  [13]: https://www.youtube.com/playlist?list=PL7VmhWGNRxKi1ikLc2b_pi6EIGOCdF10d
  [14]: https://www.intel.com/content/www/us/en/gaming/resources/how-to-boost-fps-minecraft.html