I’m not sure if anyone else has experience this with pixel streaming, but I encountered the following issues:
I created a project based on the FPS demo project in the Unreal Engine editor.
I enabled the pixel streaming plugin and pack the project.
Following the official documentation, I launched my packaged game.
When I opened the stream from another browser, I noticed that the memory on the host started leaking, consuming approximately 1.3GB per hour. It continued like this until all available memory was used.
I am using Unreal Engine 5.21, and the host computer runs on either Windows Server 2022 or Windows 10. The hardware specifications are as follows: Intel Core i7-13700K processor, 32GB of memory, and an NVIDIA RTX 4090 GPU.
Hey there @JessicaLiu520! Welcome back to the community! There was a memory leak in 5.2 that was reported, that I had believed was corrected with hotfix 5.2.1 but that may or may not be the case it seems. If this is the same bug, I know with (some) certainty the current 5.3 release had corrected it as I was running into the same issue. Does this still occur on fresh 5.3 projects?
Ahhh then it’s an entirely different issue! It’s already sounding like it’s a pixel streaming specific issue in this case. I’m going to spin up a PS instance to see if I can replicate it. In the meantime, more questions!
Has this memory leak been present for the entirety of the project?
I have tested both the shipping and development modes, but there doesn’t seem to be much difference. The physical memory consistently grows at a constant speed.
I used UnrealInsights to monitor the memory between 50-200 seconds, but I didn’t observe any significant memory leaks. Here are the details of my process:
1 I created a new pure blueprint project by launching Unreal Engine 5.2.1 from the Epic Games Launcher and selecting the FPS template.
2 In the editor, I created a UV animation(make sure the video is not static) material and applied it to the floor.
3 I added the pixel streaming plugin in the editor.
4 I selected Platforms → Windows → Shipping and then packaged the project.
Following the instructions in this link: [Getting Started with Pixel Streaming in Unreal Engine | Unreal Engine 5.2 Documentation], I obtained the signal server and started the executable with the necessary parameters.
5 I played the stream on another PC (Windows 10, using Chrome) within the local network.
If you require more information or access to my test project, please let me know.
After 2 hours of reproduction, I could accrue about an extra 1gb, so it’s slow but it does seem like there is a possible memory leak with PS. Though trying to profile where its coming from has been a bit harder. I’d recommend making a report on your side:
I have already reported the bug, and the case number assigned is #00643112. Can you tell me if this issue will be addressed in the upcoming release or a hotfix? Or do you have any workarounds that I can implement in the meantime?
Currently, the ideas I have come up with involve periodically checking the memory usage and restarting the game on the server side if the memory usage reaches a critical level. Alternatively, we could consider increasing the memory capacity on our cloud host.
However, I must admit these solutions feel somewhat ugly. Do you have any other suggestions or recommendations?
Thanks for the report then! I don’t have info on what’s going to be included in the next patch, I can do a bit of digging if an issue has been put on the issues tracker, and reports have to be reviewed by an team member internally and assigned an issue in the tracker. I’ll be trying to track things on my side in the meantime.
I agree those workarounds aren’t ideal in this situation, though knowing how much a player’s average play session is you could definitely get a little extra use out of them. Unfortunately I’m not too well versed in Pixel Streaming or that portion of the source to suggest solid edits.
You should try Windows 11. It seems that Windows 11 consumes fewer GPU resources and provides better video performance. I recently upgraded my own computer from Windows 10 to 11, as well as upgraded my Moonlight and Sunshine streaming software. The GPU usage on the remote host significantly decreased, and the graphics quality improved. I was even able to play ‘DOOM Eternal’ on a remote machine.
I tested PR10637 in version 5.2 with H.264, and it continues to create the ‘ExternalSemaphore’ object. If this object can be released, it might be a source of the leak.
Unfortunately, even though the code was committed to the repository, it missed the 5.31 version…