After upgrading from 5.5.4 to 5.6.1, we noticed a significant drop in available physical memory on iPhones. In particular, it’s pushing 4GB devices like the iPhone 11 into OOM kill territory. My two theories were it’s either from the engine upgrade, or from switching to IOS SDK, but after running regression tests on daily builds, the cutoff is clearly the engine upgrade.
I’ve attached the output from these tests, the Free/Max columns correspond to the same values in a CSV perf report. After the upgrade, spawning a crowd of bots is enough to terminate the app most of the time.
What’s frustrating is that memreports actually show a marginal improvement between the 5.5.4 build and 5.6.1, especially as we’ve identified some issues like uncompressed textures, unused UVs or excess LODs. But no amount of optimization is going to claw back ~400-500MB through no change of our own.
Worth noting that we’ve been using ANSI malloc on IOS due to stability issues on prior builds. Binned2 seems more stable with 5.6.1, but turning it on further increases physical memory use by ~200MB (the last 4 rows in the nightly table).
I’ve gotten pretty deep in the weeds running comparative Instruments memory traces. 5.6.1 does introduces a large VM allocation for the persistent linear allocator, but most of that remains uncommitted. I’ve confirmed by disabling it by setting PersistentAllocatorReserveSizeMB=0, without moving the needle at all. Actual memory usage on the persistent linear allocator seems to hover around ~15MB.
The only other thing that jumps out from comparing between the two versions is that 5.6.1 has many allocations for package loading callers like SetCustomVersions, FPakProcessedReadRequest, UpdateFromPackageFileSummary and SerializePackageFileSummary that don’t seem present in 5.5.4. But that makes little sense, as those functions did exist in 5.5.4, but there’s been enough changes to async loading that the callstacks must be different. (Instruments is an absolutely lousy tool for doing comparative profiling…)
I did briefly try Insights, but most LLM tags were Unknown and it was essentially unactionable.
Is there anything that might jump out as a likely source of memory regression on IOS in the 5.5-5.6 range? Apologies for a rather vague question without repro steps, but I’m running in circles and I’m at my wits’ end.
nightly-perftest-crowd.png(58.7 KB)
nightly-perftest.png(73.1 KB)