x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Unreal GPU Memory Footprint

Hello!

I'd have a question about UE GPU memory usage. Due to the fact that I'm trying to target as low hardware as possible I've turned off Texture memory streaming and trying to fit all the textures in the level at a 1GB video memory usage.

When using 'stat memory' I see that the 'Texture memory 2D' is at 379MB.

When I use 'stat rhi' I see that there are many things that use the gpu memory.

1.Render target memory 2D - 466MB

2.Texture memory 2D - 379MB

3.Texture memory Cube 95MB

4.Structured buffer memory 59MB

5.Vertex buffer memory 50MB

Others are neglect-able. I've attached a image showing the stats:alt text

So my questions are: 1.Is my memory usage 1098 GPU memory, that is the sum of all those stats?

2.Is the 'Texture Memory 2D' the usage of the textures that I've imported?

3.Why is that 'Render target memory 2D' so high?

4.Why is the 'Texture memory cube' so high since I only use 1 reflection probe

5.Why are there 557 'DrawPrimitive' calls? I've taken the stat in a place of the scene where nothing is draw (an empty spot without any meshes or lights casting in it)

Is there any way to deep profile the GPU memory usage and maybe see where all that extra data comes from?

Thanks & Regards!

Product Version: UE 4.18
Tags:
more ▼

asked Mar 05 '18 at 07:44 AM in Rendering

avatar image

AssemblerJohn
43 3 6 7

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

For those finding themselves in the same situation as me the following steps should be done when doing memory profiling:

  1. Close the editor and open it again so that all dangling memory is released

  2. Launch the game as a stand-alone instead of 'Play In Current Viewport'

  3. Use 'memreport -full' for a full detailed dump on the memory usage

The interpreting of the values goes as follows:

  • "RHI resource memory (not tracked by our allocator)" - Section is related to GPU memory usage, a value after all the data is shown. In my case it was '683MB total'. Since we're targeting GTX550+ I guess that we have around 300MB more of video memory that we can use.

  • "Pooled Render Targets" - Section related to the "Render Target Memory 2D". It explains there the high render target memory usage. It is high due to all the buffers allocated, especially the DBuffer textures. It also seems not to show real values all the time, that is why an editor restart is required.

  • "Listing all textures" - Section related to the textures used by your game. The list is ordered from highest memory to lowest. The top textures are a good start on optimizing. Remember that a 2k texture means about 4 1024 textures or 16 512 textures! Better use tiling textures, detail textures etc.

The video memory consumption you are targeting for is determined by the GPU that you are targeting (we're targeting GTX 550 with 1GB Vram) and if you are using texture streaming or not.

CPU memory profiling is a lot easier I'll not get in details with that too.

Even though many Unreal users already know what I've listed, maybe there would be some newcomers with the engine (like myself) that require a little bit of help when profiling the GPU usage. Searching info over the internet linked me back to my question so maybe anyone will find it useful.

more ▼

answered Mar 07 '18 at 06:32 AM

avatar image

AssemblerJohn
43 3 6 7

avatar image ColdSteel48 May 22 '18 at 01:24 AM

Huge thanks for sharing!

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question