How can I have 500MB of Untracked memory on a BRAND NEW Server?!

Hi,

I have a serious lag issue in my game, and it gets worse every single time I try to optimize the game.
Namnl%C3%B6s

Are these stats resonable for a server that was JUST created?

I Really need professional help with this, it seems I’m completely ■■■■■■■■ writing code.
Anyone have any idea what parts are unresonable high?

3 Likes

Isn’t the optimized max 200mb lmao?

1 Like

Even if I (by commandline) :Destroy every single object in the game I’m still left with 437MB untracked memory, 108 MB Sounds and a Lua Heap of 151 MB.

How is this even remotely possible?

Here’s the stats of a server that’s been running a while:
image

What is StreamingSounds and why does it almost take up 1GB of space?

Also how can there be 73MB of signals? If a character is Destroyed, doesn’t the signals get destroyed aswell? Because I’m starting to doubt that’s true.

StreamingSounds (I believe) is how much memory you’re using streaming sounds. If that’s the cause than the issue is you’re playing too many sounds. Are you playing a lot of sounds at once somewhere?

At the time of this picture everyone was in menu, it plays <10 button sounds and 1 menu theme.

Huh. You might want to double check it, I’ve had problems all the time where I’m accidentally adding like 50 million instances from doing things like button hover sounds.

The sounds size is the same before entering lobby.
But I think it has to do with storing the sounds in a table.

In the guns i do:

local firesounds  = {}
for i = 1,3 do
table.insert(firesounds, handle:WaitForChild("Fire"..i)
end

Would this delete the refference?

firesounds = nil

Or do I have to loop through the table to remove it?
It’s wierd cause the table is a local variable.

I don’t really see that being a problem unless you have a lot of guns.

I don’t know exactly how Roblox loads in sounds, but it seems to be a problem loading the audios themselves, not the sound instance. Roblox might be trying to load a bunch of sounds at once. How many individual sounds are there?

EDIT: I think you do need to set everything in the table to nil to properly get rid of the reference.

StreamingSounds are not unique sounds.
I tried create and play same soundid 1000 times by copying the sounds object.
That created StreamingSounds.
Stopping didn’t clear the memory but Destroying them did.

It seems like something has a connection to these sounds…

I don’t have many unique sounds, they are mostly same sound with diff. pitch.

According to this thread, StreamingSounds is playback of sounds in-game: Stats API Usage Guide

Try not playing them as much?

Thing is on client streamingsounds is almost nothing (~0.2) while on server it’s 50MB after just 10min.

Any idea why the server would remember old sounds from deleted weapons?

This might be a bit of a stretch, but you could try not even having the sound instances on the server and instead only make them on the client.

I don’t know why Roblox keeps the sounds, but I’m sure it’s another one of those strange things it always does. It could be a bug.

What would be the point?
I still need everyone to hear the gunfire?

@SteadyOn I ment mb, edited it.

Not sure if you’re still having this problem, but you could easily do that with remote events.