GpuCache memory leak?

GpuCache memory leak?

Anonymous
Not applicable
538 Views
0 Replies
Message 1 of 1

GpuCache memory leak?

Anonymous
Not applicable

Hi there!

 

I did already send a bug report to Maya but I thought I might share this here and perhaps someone did already encounter this and has perhaps a workaround.

 

I could not test this with Maya 2019 yet, so with a little bit of chance, this might have already been fixed. We never know. 🙂

 

So, the problem is that I get heavy memory consumption with gpuCache nodes in batch mode, using mayapy. So, no viewport or GUI etc. Normally, gpuCache nodes should not do very much under those conditions.

 

I have 5 heavy abc files of about 1GB each that I reference with 5 gpuCache nodes in a Maya scene. This gets saved out.

 

I write a little Python script like this:

 

#!/usr/bin/env mayapy
import pymel.core  # initializes Maya
import maya.cmds as cmds

cmds.file("<path_to_my_file>", open=True, force=True)
cmds.currentTime(1001, edit=True)
cmds.file(new=True, force=True)

I track the memory consumption while running this and get following:

gpucache_memory_leak_information.png

The first line indicates the moment when Maya starts to open. It takes about 13 seconds. Maximum memory consumption at this point: 500MB. Then it opens the scene and changes the current time. Duration: 1-2 seconds and 1GB of memory consumption. Then comes the fun part: it takes about 40 seconds to create a new file and RAM goes up until 4GB.

 

I run this on Linux CentOS 7 with a GeForce GTX 780 and tested with Maya 2018 Update 3 and 5.

 

The problem is that we get memory issues on our farm when writing out ass files although the content of the gpuCache should not matter, we are running this in batch. The only thing that we are interested in are the paths to the abc files, but not the content of the alembics.

 

I started to compile the gpuCache myself and removed some lines of the GpuCacheShape destructor and the removeFromModelCB function. But this just ended up in crashing Mayas. 🙂 Unfortunately, I'm really not familiar with the code of the GpuCache which is pretty complex to point to one or the other direction and try things out.

 

Had someone the same experience with perhaps a solution to this?

 

Thanks for any hint!

Carlo

0 Likes
539 Views
0 Replies
Replies (0)