How can I decipher what makes UntrackedMemory go up indefinitely?

I believe this is due to a script-related memory leak. Is there any way to decipher which script is causing it? I’ve tried using LuauHeap “Memory Categories” section, but due to this bug, it is hard to tell which scripts are causing it.

Are there any other methods to figure out what exactly is leaking in the “UntrackedMemory” section?

Here is a graph of our server memory. The green line is the UntrackedMemory category, and the yellowish line is the total server memory. I also have seemed to realize that every spike in UntrackedMemory leads to an uptick in total memory, however it does not go down like UntrackedMemory does, which is strange and could be a bug? Not sure.

Anyway, any tips on how to find out this UntrackedMemory memory leak? Any tools, resources, etc. available?

2 Likes

In a Live server, press F9 and select Server from the drop-down. Select Memory, choose Server or Client then scroll down till you find the PlaceMemory & PlaceScriptMemory. This will show you how much memory the actual game is using. See which one is the highest and track those that are increasing over time… Also check in the Scripts drop down for the Activity (%) and Rate (/s) your scripts are using. Anything high needs to be looked at.

tbh the quickest thing to do, is to remove shadows on items that don’t need them. Remove the CanTouch option and ensure everything is Anchored that doesn’t need to move. This can frequently fix slow downs and high memory usage.

PlaceScriptMemory is barely used up. It’s just the UntrackedMemory going up over time.

Any chance your game makes use of explosions?

If your game uses explosives, make sure to implement a raycasting system (might be overkill lol) but with that, you can see if the user is looking at the explosion or not, that makes it happen, or stops it

We do not use explosions often unfortunately, but if we do, it’s a very occasional one.

CC: @coolgamer294855

Hmm, weird well maybe do what the first reply said, go into the server view, and see what is causing the issue.

What should I look for exactly?

1 Like

Not really what I really know of lol, but yeah, no I don’t really know, maybe ask more experienced members