So, I’m managing a 1.12.2 server with forge & sponge. We’ve been experiencing server lags for a while so I tried to dig to find the cause.
I’ve been using VisualVM to monitor JVM and I found a weird pattern with the ram usage
Everytime the GC is triggered, the server freezes, which is normal but why is there so much ram used ?
I’ve tried to remove plugins and mods one by one, starting with sponge plugins. Nothing changed until I removed sponge itself
Okay so, Sponge seems to be a problem. I then tried to find why sponge is using so much ram, without finding the exact source but with sponge and a totally new map, no problem
So, why is sponge using so much ram with my server map (of course, erasing the map is not an option) ? I performed a heap dump to see object in ram:
So, 22% of the ram is used by this HashMap, let’s see what’s in there:
Also, what are all these PlayerTracker classes ?
Now, I really have no idea what to do to fix the ram usage. We have a lot of plugins, some we’ve written so we can’t juste throw sponge away, we need it
If anyone can help me… Thanks in advance !