I recently fought with high VRAM usage. Weirdly, my nvidia PC uses 6GB VRAM while the AMD PC uses 8GB. While investigating using the resource viewer tool, I got interested in the Nanite ClusterPageData buffer. I couldn’t reduce it by CVAR so I took a look into the engine code.
UE allocates 4GB by default on AMD cards instead of 2GB everywhere else.
Now I am just wondering. Why is this hardcoded and why do AMD cards get 2GB VRAM per default more?
Not saying that this is wrong. But I would like to gain insight to the reasoning for this.
“Implemented support for Nanite streaming pool larger than 2GB when it is supported by the hardware.”
In UE 5.7 it was changed a bit because of VulkanRHI implementation with a comment “VulkanRHI: Make sure the Nanite Streaming Manager doesn’t allocate a buffer beyond the device’s limits.”
So i guess it’s just a hardware thing and AMD somehow can support more than 2 gb while others can’t, otherwise epic wouldn’t add that.
“Added the ability to resize the Nanite streaming pool dynamically using r.Nanite.Streaming.StreamingPoolSize.
Added command to reset the streaming pool state, so all streaming data will be loaded again (r.Nanite.Streaming.ResetStreamingPool).”
And description of r.Nanite.Streaming.StreamingPoolSize Cvar was changed by adding this line at the end "Size of streaming pool in MB. Does not include memory used for root pages. Be careful with setting this close to the GPU resource size limit (typically 2-4GB) as root pages are allocated from the same physical buffer.”
So i would play around wih “r.Nanite.Streaming.StreamingPoolSize”, “r.Nanite.Streaming.NumInitialRootPages”, etc to see what can reduce it / fit better for your use case.