3
$\begingroup$

I've got a model I've been working on for a few weeks here. The file itself is 2.1Mb and there are no textures used. Although the full model is 3 million polygons, it's all subdivision and mirroring and arrays and most of it is hidden most of the time. I suspect Blender is doing some intelligent lazy generation given there's a slight delay when I unhide objects for the first time in a session.

However, I'm seeing memory usages in this scene at a bare minimum of 850Mb. When I do a render, that shoots up to 1500-1700mb and stays there (doesn't increase on subsequent renders) until I restart Blender. It's causing some minor performance issues when I've got other stuff running and in some cases I have to restart Blender after doing a render just to reclaim the RAM.

I suspect I may have a fault in my objects somewhere, and on using the space search, found memory statistics. Looking it up, it apparently ends up in the console. I could find this on previous versions of Blender by searching for "console" on Windows or by running from a command line. However, on Mac OS X, "console" returns no results and running from a command line shows nothing in the terminal window besides me starting the .app.

Thank you.

$\endgroup$
  • $\begingroup$ removed OSX from the title since answers for multiple OS's apply and are generally useful. Also OSX memory use isnt so different to other systems. $\endgroup$ – ideasman42 Oct 5 '13 at 10:30
8
$\begingroup$

To fully investigate the problem you may need debugging tools (debug builds etc), but as a user, here are some things you can do.

The first thing to check on is Blenders memory statistics in the top header and compare this to what the operating system reports Blender is using, to see if the memory is being tracked by Blender or not.

If Blender's header doesn't show a large difference in memory then its possible there is a memory leak, or more likely - one of the 3rd party libraries Blender uses is holding onto memory.

If Blender also reports a jump in memory then you can use an operator which reports details about memory use.

Reporting Memory Use

Start Blender in a terminal: See manual for instructions.

Before rendering run the operator "Memory Statistics" from the space-bar search menu. Copy and paste this text into a file.

Render the scene and re-run "Memory Statistics" copying the output into a different file.

The text will look like this:

total memory len: 9.319 MB
peak memory len: 18.868 MB
slop memory len: 5.043 MB
 ITEMS TOTAL-MiB AVERAGE-KiB TYPE
  1993 (   3.051     1.568) BLI_Mempool Chunk
   210 (   0.972     4.740) Data from ME
  2544 (   0.612     0.246) PropertyRNA
    20 (   0.584    29.922) Chunk buffer
  2296 (   0.438     0.195) StructRNA
  3025 (   0.369     0.125) IDProperty array dup
  2209 (   0.322     0.149) dupli_alloc
  1723 (   0.302     0.180) keymap entry

--- snip ---

Now you can compare the results, it may help to use a visual diff tool. search online - many free applications exist.

There may be a perfectly logical reason that Blender is using more memory but if not, then best report a bug on the tracker so a developer can investigate,

$\endgroup$
  • $\begingroup$ Thank you. Looking at the statistics, it's about 300Mb of subsurf data, which does not seem unreasonable - about 1kb per triangle, which when considering that each vertex has three axes of 32-bit float location, two axes of 32-bit float UV and nine axes of normal/tangent/bitangent data is not much. It seems to be using less since a few days ago. Whatever was causing the memory problems must have been accidentally fixed since then. $\endgroup$ – jameswilddev Oct 6 '13 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.