In-game Memory increases randomly

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Live Edit

Summary

I recently noticed that memory increased a lot and I don’t know what caused it. It seems both assets and devices now cost more, and everytime I delete a device and undo to check how much cost it has, memory increases even more!

This is a major blocker for our project that relies on memory due to its expansive areas, so memory is the only thing that can full kill it.

Below are some images of memory increasing without me doing anything on the map, and mem calc results summed up are around 41k when the map shows as max memory 77k!

Image below has nothing nearby, so nothing streams to change memory like that (happened with device deletion +undos)




UnrealEditorFortnite-Win64-Shipping_SuqhQpDp2h

Steps to Reproduce

Open a complex project with lots of devices (guards, creatures, buttons, zones, turrets)
Open live edit
While synced, delete all devices in UEFN
Undo

Expected Result

memory should be back to where it was previously

Observed Result

memory increases

Platform(s)

pc

Additional Notes

This is one of the issues I could repro, there are more that cause memory to increase, like landscape always taking memory and cannot be streamed, among others. Still investigating as the issue that caused the memory increase is not apparent to me yet.

UEFN costs can increase from release to release if devices are updated to reference more assets. The memory calculation results only display the top 100 types of actors, so if you have more than that number of actor types, you won’t be able to sum up everything to get to 77k. If actors are being spawned during edit time, this could contribute to memory increasing without doing anything. Memory is expected to have a small variance from run to run. Devices generally don’t stream, so these can have effects when far away. We will still take a look into this as well to make sure they system is working correctly.

Well the thing is:

  1. This project uses world streaming and every optimization trick I know

  2. This bump (20-30k) happened in s single day

  3. Landscape is not a device, why does it not derender?

  4. All areas of the game are placed far away from each other to save memory, with this memory bump it will make it harder to place in the main world, as the bump is due to devices and is global

  5. My guess is that there is a regression happening somewhere, and I need to spot what device had the memory increase, or whether its a systemic issue with memory in general.

  6. I have been documenting memory for the duration of this project, and thus I noticed the abnormality.

  7. I even avoid using devices in general to avoid the global memory cost, and when bumps like these happen, it s just so unfair to all the optimization work that goes into projects.

  8. This is not the first time a large project has been killed by memory bumps. Last time it was instance cost of FN floors.

  9. You can use my YT channel as an archive for the project progress, I ll go check what looked like a day ago.
    This picture is the map a day ago, and I did not add any devices (memory was static when shot was taken):

  10. Mechanics of the game are very optimized, so having 50k memory being device memory definitely feels wrong:

  11. If we had the red line that shows max memory cluster at all times, I want to believe that I would have spotted the issue by now. Please give us those mem optimization tools in UEFN, we need them so bad with these issues that are constantly happening.

  12. I don’t have HLODs enabled.

  13. Memory will not reduce in live edit unless I restart UEFN, so I don’t know how to spot the issue, delete then undo wont help.

Some more feedback from the community on the memory issues: https://twitter.com/Wertandrew/status/1730014439577923799

Largest actor in my game doesn’t exist. Its a level that even after I deleted and restarted UEFN still shows in project size. Also after deletion, the soft reference to a cinematic device causes me not to be able to run live edit any more, without a way to fix either because I cant disrupt that reference.




EDIT: To fix both I made a new sequence and copy pasted all contents of the affected one, then deleted level and reuploaded everything to server.

This also fixed memory for me, got 25k down after deleting the level that I wasnt using

To clarify on the fix, there was an unused level in my project that had devices (was an old duplicate of the map). Once I deleted it, I got the memory back. Seems memory counts in multiple levels. Memory comparison info here: https://twitter.com/Wertandrew/status/1730281209685549553

EDIT 2: That memory calculation was wrong, I am back to 44k memory now. So that level deletion was not the solution

Today memory increased another 10K (I was at 74k after deleting a lot of content)! This is now a blocker and I am stopping production until it is figured out. This is a global memory increase, because when moving the character on an empty area, I am now at 53k memory, which means its either a device that is increasing it, or systematic.

Months of work will go lost if this continues, we can’t just have memory increasing 30k out of nowhere, that’s even worse than the spike we had a year ago (which increased memory 20k and I had to stop production of my roguelite).