Low ticks and eventual server crash (Timings)

As the title say sever slowly starts dropping TPS and will eventually crash itself. Tile entities are showing up as the major issue from the timings reading but I cannot simply make anything of it. Any insight?

Bump. I did heap dump and something curious is showing up. Out of 2.5gb heap dump, references to ./world/session.lock appears to amount to as much as 1.7gb, this must be some memory leak. Screenshot - 1faa9782d45d5af64dd34327b9f52c89 - Gyazo

I’ve been working on a major performance update. Please test this experimental build and report back results

Here it is: Timings
TPS loss is still happening, and it makes it unable for me to comment on other improvements.

Try this build

Fixes an issue where chunks were not being unloaded properly during GC.

Seams to this last update really lowered te and chunks overall. However there is still TPS loss:

Install Warmroast

Then screenshot the usage during bad TPS

Here is entire snapshot during time when tps loss was at 70-90%: Warmroast

Looks like you are spawning way too many entities…Why do you have the vanilla spawner enabled when you are also running pixelmon? You are essentially running 2 separate spawners which is the problem. Try disabling the doMobSpawning gamerule

‘/gamerule doMobSpawning false’

Seams that gave it another boost in performance, those are latest timings: Timings
However, even that tps overall is like 13-15 range now there is still lot of loss, why is it?