Astral Sorcery

Astral Sorcery

63M Downloads

Astral Sorcery seems to be the source of a memory leak in my mod list.

Frazzelbeard opened this issue ยท 9 comments

commented

Hi there, I've been recently putting together a mod-list for 1.16.4 and after playing for no more that 15 min at a time the memory would reach 100%, usually the garbage collector should take care of it but in the case of a memory leak it doesn't get the memory back as far as I can tell and eventually in makes the game unplayable due to large 7-8 second lag-spikes as the 8GB i have assigned in my JVM arguments gets filled up and the garbage collector needs to clear from max. after spending an hour or two i isolated it down to Astral sorcery as being the problem which is a real shame considering how good the mod is.

this is just speculation, I'm sure there are other reasons this issue could be occurring probably in some fault of mine but i figured this may be of use to you. though it also doesn't seem like anyone else is having this issue here anyway.

thanks for your time.

commented

what are your arguments, and what happens if you run something more sane like 4-5 GB allocated instead?

What AS version?

What forge version?

What other mods?

The Ram has no real effect from what i can tell besides how long until the leak makes the game unplayable, I've tried it with as low as 2GB 4GB, 6GB and eventually now 8GB. with 8 GB i can get a solid 10-15Min of playability before I'm interupted every one to two min by large spike from the Garbage collection, which only increases in pace as the memory keeps leaking.

My JVM arguments are:
-XX:+UseG1GC -Xmx8G -Xms8G -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

The Version of Astral Sorcery is
1.16.4-1.13.7

the forge version is 35.1.13 for 1.16.4

The full ModList is as follows:
Appleskin
Autoreg Lib (LIB/API)
BiomesOPlenty
Blood magic
Bookshelf (LIB/API)
Clumps
Cofh core (LIB/API)
Crafting Tweaks
Crafttweaker
Create
Connected textures mod
Curios
Eidolon
Enchantment Descriptions
Ensorcellation
Fast Workbench
Foragecraft
Geolosys
Hwyla
Immersive Engineering
Immersive Petroleum
Infernal Mobs
Ironchests
Iron Shulkers
JEI
JEI tweaker
Mantle (API/LIB)
Mgui (API/LI)
Mouse tweaks
Nature's Compass
Neat
Observer lib (API/LIB)
Optifine
Pam's HC 2 Crops
Pam's HC 2 Foodcore
Pam's HC 2 Trees
Patchouli (API/LIB)
Placebo (API/LIB)
Quark
Reliquary
Shutup experimental settings
Simply Tea
Spawner Fix
Storage Draws
Swing through grass
TerraForged
Tetra
Towers of the Wild
Waila Harvestability
Waystones
Worldstripper
Xaeros Minimap
Xaeros Worldmap.

Much apreciated.

commented

You aren't garbage collecting regularly. That's the problem. "Dsun.rmi.dgc.server.gcInterval=2147483646" pretty much disables the normal interval because it sets it to maxint. So either 24.5 days or disabled, I don't recall which.

This isn't AS causing a memory leak, this is your java args disabling scheduled GC. Remove that arg and try again. Wherever that came from should never be trusted, honestly, unless they can provide logical evidence that it improves performance with MC through some backwards illogical magic, because I've literally never seen it do so.

commented

Also update your AS version to 1.13.9, and observerlib to 1.5.1.

commented

what are your arguments, and what happens if you run something more sane like 4-5 GB allocated instead?

What AS version?

What forge version?

What other mods?

commented

You aren't garbage collecting regularly. That's the problem. "Dsun.rmi.dgc.server.gcInterval=2147483646" pretty much disables the normal interval because it sets it to maxint. So either 24.5 days or disabled, I don't recall which.

This isn't AS causing a memory leak, this is your java args disabling scheduled GC. Remove that arg and try again. Wherever that came from should never be trusted, honestly, unless they can provide logical evidence that it improves performance with MC through some backwards illogical magic, because I've literally never seen it do so.

That's really Helpful, ill give that a go! while I'm here is there a place you would recommend that i could teach myself about JVM args? They seem really powerful but with no frame of reference I can only really piece together the very most obvious, and the rest seems like Thaumaturgy.

commented

Outside of the oracle docs, not reslly. They are a tad arcane, yeah.

Any improvements?

commented

Having the same problem on forge version 35.1.36 with Astral Sorcery version 1.13.9, but my only java arguments are -Xmx7168m -Xms256m -XX:PermSize=256m

commented

Please provide a Sampler output for Memory of the pack when the issue is occurring.

commented

Outside of the oracle docs, not reslly. They are a tad arcane, yeah.

Any improvements?

Oh yea, dramatic improvement, I no longer have any issues at all, the garbage collection runs as intended! And the ludicrous amount of memory allocated has meant that it's smooth as butter.

Thanks for the help, I think that someone needs to write up some documentation for Args, they can make the game either better or much much worse if you're not careful.