Memory Analyzer memory amount isn't accurate

Reproduction Steps

Game Link: https://www.roblox.com/games/904144470/ERROR-SIMULATOR

1.) Join the game.
2.) Press F9 and go to the memory tab.
3.) Add up the core memory and place memory.

  • The amount of memory both are using will pass the amount of total memory the game is supposedly using.
  • Sometimes with enough NPCs spawned in (The NPCs are people on your friends list and a default list) the Place Memory tab can list the memory total above the total amount of memory being used by Roblox.
  • Task manager doesn’t even come close to the amount of memory being used.

System Info: Windows 11, i7-8700k, Nvidia 3080, 32GB RAM

Expected Behavior

Task manager, each tab in the memory analyzer and the total amount of memory being used by Roblox should state correct amounts with a small sliver of deviance. (I don’t expect Roblox to be 100% accurate, but to be at least somewhat accurate)

Actual Behavior

Pictures:


Memory analyzer isn’t accurate.

Issue Area: Engine
Issue Type: Other
Impact: Low
Frequency: Often
A private message is associated with this bug report

1 Like

Thanks for the report! We’ll take a look.

3 Likes

Hello Starved_Skeleton!

There are unfortunately many complicated ways of viewing “total” memory.

The summary task manager reports looks like “private working set” (not the “active private working set”). That’s the physical RAM the application takes, with some of it being paged to disk (pagefile) and/or living in VRAM, but also excluding some memory like large pages, AWE and maybe other things like memory-mapped files.

In task manager, turn on all the other memories to see differences: In Task Manager (right-click, select columns).

  • Working set (memory)
  • Memory (active private working set)
  • Memory (shared working set)
  • Dedicated GPU memory
  • Shared GPU memory

They each measure different things - here’s more reading on the topic:

Task Manager focuses on physical memory usage that is minimized by OS pagefile swapping. Roblox counters measure the values we ask of the allocator directly, but may not account for driver or OS overhead and internal allocations. This is why PlaceMemory can grow way beyond the total: Task Manager reports physical usage sizes, not request sizes. So the caches Roblox retains can get large but aren’t actively used. The OS sees this and puts those caches out of physical memory into the pagefile, so PlaceMemory counters, which includes cached values, looks larger than the physical memory usage by Task Manager’s measure.

I take away a few thoughts from this report:

  • Roblox should use consistent rounding in reports of memory.
  • OS and Engine optimizations will underuse (swapping) or overuse (caching) memory for complicated reasons that are out of the creator’s control.
  • Roblox should report totals based on Roblox counters, not try to mix in the complexities of OS reporting with the piecemeal counters mixed in.
    *Roblox reporting should more clearly separate creator-controllable vs non-controllable memory usage, thus making the information more actionable by creators.

Please share your thoughts! We are assembling a plan to make measurements more meaningful and actionable so any feedback would be appreciated.

5 Likes