Reference main branch CLs 43029665 and 42965825. We have ported these changes to 5.4 and see a very small CPU performance improvement, but its not clear exactly what this is doing and how it differs from the previous memory implementation. We are approaching publication so this is very late to be applying such a change so would like a good reason to go with it.
Also is this PS5 only, is there a version for the other platforms (Windows and Xbox Series)? Is this taking advantage of Sony only API?
Thanks
Hi,
Here basic info that was shared internally about this change. I think it answer your question.
Those changes saved tons of memory in Fortnite (700MB) and improved CPU performance by about 15%. This is a complete rewrite of physical and virtual memory management on PS5, so there’s no way to go back, this is on by default in 5.6. It is largely the same implementation done on PS4 in UE 5.4 (I think), so it has been stable and tested in a couple of titles now. However, we recommend you to increase the size of CPU and GPU page cache from default 64 to 96 MB in your TitleConfiguration.json by adding these two lines:
“CpuPageTableSize”: 96,
“GpuPageTableSize”: 96
This change was the last piece in bringing PS5 to feature parity with PS4, XB1 and XSX in terms of Large Memory Pages support. It, however, covers only a part of all memory allocations. Our next big step is to move all allocations to Large Pages. We expect we can save an additional ~10% of CPU time (maybe more on RT) on all supported consoles, including past gen. However this time it’ll come with memory overhead and it’s hard to estimate it. I think it’s safe to assume it’ll be at least 100 MB on XB1, less on PS4. It will all depend on implementation efficiency and memory fragmentation. The timeline for this is not decided yet, approximately by the end of this year.
Regards,
Patrick
Great thx Patrick
Yes I also ported over the required changes to set the CPU and GPU page cache as the code to do this was missing in 5.4. So far in my local testing I’ve seen no issues.
However, I have not applied the changes in AgcSubmission.cpp/.h as this file does not exist in 5.4. Do you know where the equivalent code would be in 5.4?
Hi,
The change to AgcSubmissions.cpp/.h were done to the class FAgcTransientHeapMapper. That class existed in 5.4 in D:\UE_5.4\Engine\Platforms\PS5\Source\Runtime\AgcRHI\Private\AgcContextCommon.cpp. From my quick look, that should be trivial to integrate them as it seems the class was just moved to a different file.
Regards,
Patrick
Hi,
Now that you have 42965825, you probably want to pick CL 43731405 as well. It fixes a virtual memory leak on PS5.
Regards,
Patrick