[vtkusers] Memory Size Question
Michael Jackson
mike.jackson at bluequartz.net
Fri Feb 23 16:06:46 EST 2018
We have a Tiled data set consisting of a 9x5 grid of images. Each image is 1292x968 grayscale. We are reading all of the images into a VTK based application to render. After the data finally rendered (Took about 5 minutes on an iMac Pro with Vega64 GPU) we took a look at the memory usage of the app. Before loading the data it was sitting at about 390MB. After loading and rendering it was taking somewhere from 16GB~17GB. I have tried to "do the math" to account for all the memory but I am coming up _really_ short in trying to account for what could be taking up all the memory. As a check we loaded the same dataset into ParaView and ParaView took around 20GB so we are not that far off. Just seems like that is a lot of memory to use. But maybe I'm just not familiar enough with the VTK and the OpenGL backend to understand why that much memory is required.
Math Part:
1292 * 968 * 54 = 67,535,424 bytes of uint8 data.
If there are triangles being rendered then I would assume that roughly there is 1293*969*54 = 1,252,917 verts @ 12 bytes each = 15,035,004 Bytes. Then we need to generate Triangles so that is 2 Triangles per voxel = 1292*968*54*2=135,070,848 cells. Maybe 4 size_t (64bit ints) for the description of the cell to get us to 4,322,267,136 bytes to hold the triangle information. We need to generate RGBA color for the actual rendering: 1292 * 968 * 54*4 = 270,141,696 bytes.
67,535,424
15,035,004
4,322,267,136
270,141,696
---------------------
4,674,979,260 Total Bytes.
Where is the other 12GB of memory being taken up? A gentle explanation would be wonderful. We are trying to figure out if we are doing something wrong in the codes.
--
Michael Jackson | Owner, President
BlueQuartz Software
[e] mike.jackson at bluequartz.net
[w] www.bluequartz.net
More information about the vtkusers
mailing list