mojira.dev
MC-168633

Villager AI causes immense lag (adds up with large village populations) - does not happen in 1.14.4

The server is crashing often - on the order of minutes.  It also is taking a very long time to execute some operations like eating, smelting, and brewing.

 

This is happening in a chunk that has a great deal of redstone and a great many villagers and animals.  The server seems stable away from this chunk.

 

This world was stable with very little lag in 1.14.4.  I have uploaded the world in its current state as well as its last state in 1.14.4.  Link provided below.  I have also uploaded a screenshot of the server system specs to the same location.

 

I am currently running the client from the same machine as the server.

 

Additional notes that may be useful:

  • Animals and villagers move in short steps with pauses instead of smoothly.

  • Golems in lava take a very long time to die, with each sound occurring with a long pause in between.

  • I reached an impasse trying to brew a potion.  The server crashes before the slow operation can complete.  Then, when the server restores, the blaze rod is used but the potion brewing starts over.

  • CPU utilization seems fine.  Uploaded screenshot.

 

Link to worlds and specs:

https://drive.google.com/drive/folders/1eReWDHUW6xnNoHbHDpOvRfxoYEjmPQHM?usp=sharing

 

 

Linked issues

Attachments

Comments 16

We do not have enough information to find the cause of this issue.

Please attach the crash report found in [minecraft/crash-reports/crash-<DATE>-client.txt|https://minecrafthopper.net/help/guides/finding-minecraft-data-folder] here.
If you cannot find a crash report, please attach the full launcher log found in [minecraft/launcher_log.txt|https://minecrafthopper.net/help/guides/finding-minecraft-data-folder/].

This issue has been temporarily closed as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

The zip files I already provided contain the entire directory containing the world.  This includes many, many crash log files.

These crash reports suggest that this is caused by horrendous server lag. To find out why the server is lagging, please do the following:

While the lag occurs, please run /debug start, wait a while and then run /debug stop in order to create a debug profile. Afterwards, run /debug report.

If you do not have the permission to run these commands, open your world to LAN and enable cheats. If you're on a server, make sure that you're a server operator in order to execute these commands.

Then, please attach the profile results found in [minecraft/debug/profile-results-<DATE>.txt|https://minecrafthopper.net/help/guides/finding-minecraft-data-folder], as well as the debug report found in [minecraft/debug/debug-report-<DATE>.zip|https://minecrafthopper.net/help/guides/finding-minecraft-data-folder] here.

This issue has been temporarily closed as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

Sorry for the delay.

This issue is definitely caused by the 350 villagers you have in that area – the game is not able to handle this many villagers at once. I'm unsure whether we can really track this as a bug, as this would be more of a performance improvement and is not a real bug by itself. Perhaps we even have another ticket for this already, although I couldn't find one with a quick search.

To work around this problem, you have multiple options:

  • Reduce the number of villagers in that area

  • Put them into cells (edit: without a bed, and with one villager per cell) that prevent them from pathfinding constantly

  • Reduce server render distance drastically

  • Get better server hardware

I know that these workarounds don't seem exactly too helpful, but they are the best you can do to solve the issue in the short term. I'll leave this ticket open, but as it is more of a performance issue rather than a straight up bug, don't expect this to be fixed too soon.

Your world is a great benchmark for testing lag with villagers though!

6 more comments

@unknown please stop asking for updates. only mods and helpers can ask this.

Can confirm in 1.17.1. Might relate to MC-217906 and MC-229365.

Can confirm in 21w39a.

Can confirm still in 21w40a.

Can confirm for 1.21.3 

Dan Busenbarrick

(Unassigned)

Confirmed

Platform

Important

Performance

large-group-performance

1.15.1, 1.17.1, 21w39a, 21w40a, 1.21.3

Retrieved