Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Ghasts Teleporting through Nether Portals cause significantly more lag than other Entities.

Open PoiiohPoii opened this issue 2 years ago • 4 comments

Timings or Profile link

https://spark.lucko.me/ooh5SoyreL

Description of issue

Ghasts that teleport through a nether portal cause significant amounts of lag. Normally this does not occur under default paper settings.

Plugin and Datapack List

Spark

Server config files

(https://paste.gg/p/anonymous/775877fe088745df8d268f29027ac95d)

Paper version

This server is running Paper version git-Paper-521 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: bcec5b1) You are running the latest version Previous version: git-Pufferfish-"f3011e9" (MC: 1.19.4)

Other

Seems to scale significantly as the server is put under more load.

Video of the lagspike happening on a superflat world, with an MSPT near 0: https://streamable.com/bszsx5

This also seems to be specific to ghasts. Cows, creepers & other mobs cause nearly no lag

PoiiohPoii avatar Apr 30 '23 18:04 PoiiohPoii

I've experienced the same issue as well.

Pantera07 avatar May 06 '23 09:05 Pantera07

Same here

mcmdev avatar May 07 '23 16:05 mcmdev

Ghast Issue with Ghast's collision box size

Pantera07 avatar May 20 '23 02:05 Pantera07

Same here. Causing 400ms lag spikes with ghast farms.

Teslicek avatar Jun 10 '23 12:06 Teslicek

I'm also having this issue,1.20.1

CatTeaA avatar Jun 27 '23 15:06 CatTeaA

I think the best solution is to add a configuration that skips the collision box size check if the entity moving through the portal is a Ghast.

Potothingi avatar Aug 23 '23 12:08 Potothingi

Hey @PoiiohPoii, can you please provide a new spark report?

codebycam avatar Aug 24 '23 03:08 codebycam

@CodeByCam They're inactive now, but I administer the server this concerns. Do you need a report for when the server is under load with players using ghast farms?

mcmdev avatar Aug 29 '23 14:08 mcmdev

We'd certainly be happy for more spark reports yea 👍

lynxplay avatar Aug 29 '23 14:08 lynxplay

https://spark.lucko.me/w27OFfDZub - On Linux

GoldenEdit avatar Aug 31 '23 00:08 GoldenEdit

https://spark.lucko.me/w27OFfDZub - On Linux

1 "VoxelShape"

Potothingi avatar Aug 31 '23 09:08 Potothingi

Thanks for the info @GoldenEdit. We're aware of this issue and will hopefully be able to improve the performance around VoxelShape. Are you able to provide a zip of a world (or part of) with the farm you have please?

codebycam avatar Sep 02 '23 00:09 codebycam

Thanks for the info @GoldenEdit. We're aware of this issue and will hopefully be able to improve the performance around VoxelShape. Are you able to provide a zip of a world (or part of) with the farm you have please?

When reproducing this I was only running a quick test by spawning Ghasts directly into the portal.

I may be able to provide you with a WorldEdit schematic of one of the farms on a server I manage, let me know if you would like that.

This issue happens anytime a ghast enters a nether portal, so any farm that uses an overworld killing chamber causes lag to servers.

GoldenEdit avatar Sep 02 '23 00:09 GoldenEdit

Thanks for the info @GoldenEdit. We're aware of this issue and will hopefully be able to improve the performance around VoxelShape. Are you able to provide a zip of a world (or part of) with the farm you have please?

When reproducing this I was only running a quick test by spawning Ghasts directly into the portal.

I may be able to provide you with a WorldEdit schematic of one of the farms on a server I manage, let me know if you would like that.

This issue happens anytime a ghast enters a nether portal, so any farm that uses an overworld killing chamber causes lag to servers.

Yeah that's fair enough, and I've been able to reproduce it with just the spawning into a portal too, but actually having a farm would be handy to test it. A schematic for the Overworld & Nether side would be fine too!

codebycam avatar Sep 02 '23 01:09 codebycam

Can no longer reproduce the large lag spike in 1.20.2 thanks to leaf's collision optimisations

Warriorrrr avatar Sep 28 '23 13:09 Warriorrrr