Itoo Software Forum

Author Topic: Memory Leak?  (Read 1129 times)

SkyeboySteve

  • Newbie
  • *
  • Posts: 2
Memory Leak?
« on: March 19, 2015, 12:19:04 AM »
I'm using an I7 3930K (six core) CPU over-clocked at 4.5Ghz with 64Gb RAM (as my primary machine) and 3DS Max 2015 SP2 and Forest Pack Pro 4.3.6, rendering with Mental Ray; but I seem to suffer from memory leaks, including on other computers used in my small render farm when scattering a very large number of objects with Forest Pack.

For example, on my primary machine, after rendering around 30 frames, memory use progresses from about 14Gb to anywhere from 30Gb to 54Gb, and render times for a similar frame can jump from 20 minutes to 4 hours plus.  Some render nodes run over 24 hours without completing a frame before I reset it--and all is well for awhile.

I ran the exact same scene / animation sequence (other than low resolution, low quality settings [including 10x10 resolution]) without any forest pack scattering, for 100 frames and memory held steady at 13.1Gb, and render time held steady and render times held steady at 1 second per frame.  With all the Forest Pack Pro objects in the scene, (with the previous stated settings) the memory started at around 14.1Gb and slowly rose to 20Gb in 30 frames (before I ended the test)--render time started at 30 seconds and progressed to 47 seconds in those thirty frames.  (By the way, I restarted 3ds max between each test to reset memory used).

I also ran the test with just my largest scatter group [Forest] deleted.  I ran all 100 frames with memory only increasing slightly by about 1Gb and render times stayed somewhat steady from 10 seconds to 11 seconds.  My largest scatter area [Forest] has approximately 52,000 Render Items at it's highest point in the animation sequence, with a Far Clipping plane camera limit of 440000" (appoximately 11km).

My second largest area [Grass] has a maximum of 18,000 Render Items in any given frame, and covers an area that is approximately 44m in radius.  I have about six other groups that have less than 1,500 rendered items.

Not sure if any of the above information is useful, but if anyone has an idea about what I might be doing wrong, it would be greatly appreciated as I'm trying to keep my render times to the absolute minimum.

Thanks.
« Last Edit: March 19, 2015, 12:21:42 AM by SkyeboySteve »

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: Memory Leak?
« Reply #1 on: March 19, 2015, 10:49:45 AM »
I've done a quick test rendering 50.000 instances of three high poly models (1 Mill. to 2 Mill. faces each one), but everything seems correct. Also the memory footprint is low (about 3Gb.).
You can find the scene and result attached (it requires HQ Plants 1, because the models i used).

Please, would you repeat your test using a clean scene, including only your largest Forest object ? That should be easier to debug.

Thanks,
Carlos Quintero
iToo Software

SkyeboySteve

  • Newbie
  • *
  • Posts: 2
Re: Memory Leak?
« Reply #2 on: March 20, 2015, 12:59:29 AM »
Thanks for your very quick response.  Greatly appreciated!

I tried your scene using the three trees from the "using surfaces" tutorial, and it worked exactly like it had for you.  The memory use stayed consistent and so did the frame rates.

I started with a new scene, after a reset, and inserted  MR Sun and MR Sky, then imported the terrain mesh from my regular scene and one of the animated cameras, then used the same scattering parameters with the three different trees as I had with my regular scene.

My render times didn't go up much and memory use rose from 12.5Gb to 19Gb.  I realized with my animated camera some frames would take less time than others, so I made the camera motionless and rendered another 100 frames.  This time memory use increased to only 17Gb, and render time only went up from 33 to 35 seconds.  In any case, even though the change was insignificant in this case, RAM use continued to grow--and probably would have grown much more with more faces to render (like in the original scene).

The only differences between my scene in the end, and the one you attached, was that I used a mesh with about 562,000 polygon  (instead of a plane and rectangle) to scatter the trees on, and I used mrSun and mrSky for my daylight system vs the standard lights you used for your daylight system.

Perhaps I should try my scene again with standard daylight instead of mr, unless there's something magical about my mesh conflicting with forest pack pro.

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: Memory Leak?
« Reply #3 on: March 20, 2015, 01:39:04 PM »
It's a strange issue. I'll try to do more tests using different settings, i hope we can get some clue.
Carlos Quintero
iToo Software