SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

Lag in PhaseContext.close? #2967

Open LemADEC opened 5 years ago

LemADEC commented 5 years ago

I am currently running

Plugins (19): Minecraft, Minecraft Coder Pack, SpongeAPI, Sponge, AntiWDL, BetterChunkLoader, Broadcast, CatClearLag, ClearMob, Enjin Minecraft Plugin, GriefPrevention, LuckPerms, MCClans, Nucleus, Nucleus API, Pieconomy, Server Backup, WrapperPing, spark

Issue Description After updating spongeforge from RC3900 to RC3909, lag is reported in console. According to profiler, PhaseContext.close is taking 25% of CPU. TileEntityTickContext.source is taking 10% of CPU. checkIfTileHasActiveChunk is taking 5% of CPU. It could be related to players using WarpDrive force fields (i.e. lots of tile entities).

image https://sparkprofiler.github.io/#DuVGJa69n3

gabizou commented 5 years ago

Need a yourkit or visualvm profiling doc. The spark profiler doesn't provide enough information for me to point where there's potentially problems.

LemADEC commented 5 years ago

I was able to grab a short profiling while the server is frozen in that PhaseContext.close() call: image That's in SMP with SpongeForge: 1.12.2-2838-7.1.7-RC3924 Minecraft Forge: 14.23.5.2836 JVM: 1.8.0_212/64-bit (Oracle Corporation) OS: Linux (3.14.32-xxxx-grs-ipv6-64/amd64) I suspect it happens when a force field collapse (removing lots of tile entities in a single tick)

WarmRoast Sponge#2967 2019-09-22a.zip (actually a 7-zip archive)

LemADEC commented 4 years ago

Any further information needed?