ImmersivePortalsModForForge icon indicating copy to clipboard operation
ImmersivePortalsModForForge copied to clipboard

Client side memory leak

Open Smartin-b opened this issue 3 years ago • 4 comments

1.16.5 Forge 36.1.24 immersive-portals-0.16-mc1.16.5-forge and 1.16.4 Forge 35.1.37 immersive-portals-0.14-mc1.16.4-forge

If the client is loading a lot of Chunks its off-heap memory is consistently growing. The Bug only apear on multiplayer, not on a integrated server even though the bug is on the client-side.

To replicate the Bug it is necessary to load a lot of chunks, to test the bug i flew around 10-20 minutes with a elytra and 20 chunks renderdistance.

Smartin-b avatar May 24 '21 12:05 Smartin-b

this is both client and server side, it's extremely bad. If you want to combat it, you'll need to fine tune the Garbage Collector with java load args

Jaskowicz1 avatar Jul 19 '21 11:07 Jaskowicz1

No i cant, the Problem is the leak is in the Off-heap part of the jvm. As far as i know things Off-heap are not tracked by anything, not even the GC. This makes finding the cause very difficult. You can not see the climb in memory usage in the F3 Screen or with other debug tools, but the total ramusage of the JVM still rises consistently. If you have any idea how to combat this, it would be very welcome

Smartin-b avatar Jul 23 '21 02:07 Smartin-b

Yeah, I agree, fine tuning the JVM doesn't work. I did more testing and it's still only resulting in an inevitable Out Of Memory crash.

Honestly, the only way to combat it is to remove the mod, however, this breaks portals in your world so you can't make portals anymore.

Jaskowicz1 avatar Jul 23 '21 08:07 Jaskowicz1

Hm, after some further testing i noticed this memory leak is not only present in the forge 1.16 releases, but also the latest 1.15.2 forge and 1.16.5 fabric release. Although the leak is far smaller on fabric, it still is present.

Smartin-b avatar Jul 29 '21 18:07 Smartin-b