When I played Roblox today I noticed that the client is using way too much memory in some games it uses 3 GB of memory I decided to join a baseplate game and it was using 2.5 GB memory I think there is a memory leak going on in the Roblox client
Hello!
Could you please save and share with us a Microprofiler dump (an HTML file) from your client when you launch it, open the baseplate, and it shows high memory consumption?
The dump will contain a breakdown of memory usage. If you switch it to Mode → Counters, we’ll be able to understand how memory is distributed across Engine subsystems.
It’s just the normal amount of RAM that roblox uses. RAM usage has been increasing over the years, more with each thing they add to studio and client. Roblox stores every base effect and default texture in the RAM for instant access, even if the client never uses it. RAM will also increase depending on how many meshes, decals, material variants, etc is in the game. It’s just an optimization issue on roblox’s end.
Ideally, we should strike a balance between the two, with proper use of caches and so on.
I just ran a client on Windows, and I’m seeing approximately 950 MB on the baseplate (which is still high, but not 3 GB). So it’ll be interesting to compare that with other measurements.
It looks like you ended up in the experiment - for some players, we changed the way the client calculates the total memory usage.
Previously, we used what’s called Resident Set Size (RSS), which measures the portion of a process’s memory that is physically in the computer’s RAM. This value is closer to what Windows Task Manager shows.
For the experiment, we started calculating how much memory we reserved in total (i.e., how much virtual memory was allocated), which is higher than the actual physical memory usage.
This caused a bit of havoc even in our internal measurements. We haven’t yet decided which metric we’ll use universally going forward.
In any case, changing the counter does not affect how the game actually uses resources. The memory counters in the dump show that all subsystems, except the GPU, actually allocate even less memory than I see on my laptop. As long as it doesn’t interfere with gameplay, everything is fine. Hopefully, the situation with the counter will stabilize over time.
Why not just show both then? Knowing both values could be useful.
The reserved memory could also probably be shown as extra information when clicking on the memory usage as to not confuse users about it being extremely high.
Right. The first part is technical and can be solved with two counters. The second part is non-technical (user experience), where we need to show just one number that would cause less confusion.