I have some problems with understanding the differences between the profiler memory stats and system reported stats.
Unity version: 2021.2
Build target: Windows 64
OS: Windows 10
I’m using editor profiler connected to the development build and ProfilerRecorder api to gather the stats.
Here are the example stats:
Total memory reported in the profiler: ~10GB ( “System Used Memory” (ProfilerRecorder) or “Total Committed Memory” (Profiler window))
App allocated momory (Windows resources manager): ~10GB
App memory reported in the task manager/ working set from resources manager: ~5GB
Physical memory used by the app: ~5GB
I measure the ‘used physical memory’ by comparing the value before launching the app and when it’s active. So when my system uses around 4GB on idle and it shows 9GB when the app is running I presume that the app uses around 5GB. I don’t know if it’s the correct way of measuring it.
Of course the ‘virtual committed memory’ grows with ‘physical memory used’ but AFAIK it’s a standard behaviour on default Windows memory management settings.
Should I focus on the total committed memory from the profiler and resources manager or should I focus on used physical memory when measuring/profiling/optimising physical RAM requirements for the app?
I can go into details if it’s necessary but maybe this is some trivial question that can be answered easily.
Any reply will be much appreciated.
Thanks.