| Project: | YafaRay |
| Version: | 0.1.2 Beta |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Yafaray uses disproportionate more RAM for textures that it should.
The checker material in the below attached scene, has 3x 4096x4096 textures applied, as follows:
DIFFUSE: 4096 x 4096 RGB image = 48 MB in memory
BUMP: 4096 x 4096 grayscale image = 16 MB in memory
SPEC: 4096 x 4096 grayscale image = 16 MB in memory
Total in-memory need for textures is: 80 MB
If rendered from the command line the yafaray-xml process uses 876.4 MB of RAM. If the same scene is rendered without the textured material (with the NoTex material applied instead), the Yafaray-xml process uses 87.3 MB. This means that Yafaray has a memory leak ragarding loading textures, as the difference between the two teste is as much as the textures would be loaded 9 times.
The same scene (textured) was tested with Blender internal which uses a more realistic 157 MB and Octane Render which usage is also in line with BI: 153 MB
See this posts for additional details:
http://www.yafaray.org/community/forum/viewtopic.php?p=25277#p25277
http://www.yafaray.org/community/forum/viewtopic.php?p=25299#p25299
| Attachment | Size |
|---|---|
| memtest-update2.zip | 142.67 KB |
Comments
#1
Confirmed on Windows.
Guía de YafaRay en Español
#2
I can confirm this on linux
a 4096 * 4096 texture (depth does not matter) takes 256 mb ram on my 64 bit linux
sizeof(CFLOAT) = 4 -> 32 bit float per channel
sizeof(colorA_t) = 16 -> 128 bits per pixel even without alpha ( 3 cahnnels) as gcc alligns them neatly
SCENE thus uses:
1 500x500 and 3 4096x4096 textures
((500^2) + (3 * (4 096^2))) * 16 = 809, 306,368 or ~ 772 MB just for textures