Jump to content

Mantra Using 35mb Out Of 2gb Ram


zasid

Recommended Posts

Hi,

I have Core 2 Duo 2.4 Ghz with 2GB of Corsair ram.but when mantra renders its shows 1000% CPU usage but uses only 35mb ram out of 2GB ram which I think slows my renderer's ,is there any way Mantra can make full use of my remaining ram at least 1GB of it . thank you.

regards,

Zohaib

Link to comment
Share on other sites

Ha, ha, this is nice, never heard such complaining. Yes! Mantra is designed to use as small RAM amount as possible. Isn't it beautiful? You will thank for this in a bigger scenes. It simply doesn't need anything more beyond the number you see.

In a meantime (waiting for bigger scenes) you can set for example environmental variable: HOUDINI_RAT_USAGE to something like 128, This will force mantra to use more RAM for textures at one time. Normally mantra loads to RAM only some portion of textures (32MB by default). Indeed this seams to be too small nowadays. There are few others options like micropolygon cache size etc., but I'm not even sure which of them are still valid in H9.

Here you have wiki page about Mantra's optimization:

http://odforce.net/wiki/index.php/MantraOptimizations

At the very bottom you have a few words about -M and -G flag. Not sure how they work with H9 though...

cheers,

sy.

Edited by SYmek
Link to comment
Share on other sites

Appendix:

I've found also two unexposed parameters for Mantra ROP:

- Geometry Cache Size

- Texture Cache Size (this is equivalent of global variable mentioned above I suppose and concerns *all 2d and 3d textures files: rat, i3d, pc etc)

both have a defaults value of 32MB. You can add them to you ROP by "Edit Rendering Parameters" (Gear icon of the parameter tab).

Finally I can tell you that in my test scene which has no textures, ultra light geometry (like 1K poly) but uses photon map consisting of 10 million of photons, mantra uses 460MB of my RAM in default setting. This scares me a lot! ;)

Edited by SYmek
Link to comment
Share on other sites

Appendix:

I've found also two unexposed parameters for Mantra ROP:

- Geometry Cache Size

- Texture Cache Size (this is equivalent of global variable mentioned above I suppose and concerns *all 2d and 3d textures files: rat, i3d, pc etc)

both have a defaults value of 32MB. You can add them to you ROP by "Edit Rendering Parameters" (Gear icon of the parameter tab).

Finally I can tell you that in my test scene which has no textures, ultra light geometry (like 1K poly) but uses photon map consisting 10 million of photons, mantra uses 460MB of my RAM in default setting. This scares me a lot! ;)

Thank you for the reply.But where can I get those flags?and sorry the CPU usage is 100% NOT 1000 % he he.

thanks.

Link to comment
Share on other sites

Flags you apply in Main Tab of Mantra ROP, see Command parameter. By default "mantra" is only one.

Please note that Mantra is perfectly tuned for a most of your needs and this flags (if they still work for h9) are worth to try in special cases. Micro-polygon cache flag is usable in a heavy displacement scene, -G flag works for multi-reflections in ray-traced scene (lots of reflective surfaces). Unless you know what you need in addition you should stay with defaults I think.

Perhaps RAT memory limit can help as I mentioned previously.

cheers,

sy.

Edited by SYmek
Link to comment
Share on other sites

The main control you have over memory usage as you render in both Mantra and RenderMan is bucket size or "Tile Size". The default is for mantra to only load in a tile size of 16x16 pixels. If you aren't raytracing, only the geometry inside this 16x16 tile (or bucket) is being rendered.

Output Driver > Properties > Render : Tile Size 256

You can tune mantra's memory consumption by increasing or decreasing the tile size. Increase by multiples of 2 is recommended: 2, 4. 8, 16, 32, 64, 128, 256...

You can increase the tile size to increase the memory consumption and drive down render times. The maximum is the final output resolution of your image.

To profile your renders, you can increase the Verbose Level in the Output Driver to say 2 or 3 to get render times and memory consumption per frame. Use these stats to tune the bucket size.

output driver > Properties > Statistics : Verbose Level 3

Note: Raytracing will force all objects that are reflecting to be loaded once a surface that is reflective is hit. Tuning bucket size is still relevant but mainly for render times.

Note: You can increase render times by the order in which buckets are rendered. When Mantra renders tiles from left to right only, it will cache all the previous tiles in memory. When mantra finishes rendering the last tile in that row, it flushes the memory and starts to render a new row.

The interactive mantra renders may take slightly longer to render than non-interactive renders because of this fact. The interactive mantra renders buckets clockwise from the center. It just means that mantra has to do a bit more management.

Tip: You can change the Mplay tile order from the default Interactive (starting in middle) to bottom up (matches non-interactive order) or top bottom to take advantage of Mantra's caching of buckets from left to right.

Link to comment
Share on other sites

great question and answers

tried the bucket size:

(96 bucket size) Render Time: 217.421u 3.109s Memory: 1.74 GB of 2.42 GB arena size

(16 bucket size) Render Time: 214.265u 2.796s Memory: 253.72 MB of 289.14 MB arena size

how do you interpret those render times?

(on my rough timing it was like 3:20 vs. 3:50 ... ~ 13% faster)

Edited by mark
Link to comment
Share on other sites

First off to answer the original question at the start of the thread, you can certainly make Mantra consume more memory by increasing the bucket size. :)

From what I remember, the first timing number u is the time actually taken by Mantra to render. The second value is system overhead time I believe. It is valid to add both together but I usually look at the first set of times. Given that the two render times are pretty close.

As for why increasing the bucket size increased render times, no idea. Depends on the scene, materials, mantra options, etc.

Link to comment
Share on other sites

(96 bucket size) Render Time: 217.421u 3.109s Memory: 1.74 GB of 2.42 GB arena size

(16 bucket size) Render Time: 214.265u 2.796s Memory: 253.72 MB of 289.14 MB arena size

how do you interpret those render times?

96 bucket size

- 217.421 seconds used by CPU

- 3.109 seconds used by system calls (i.e. windows/Linux system libraries)

Or around 220 seconds, or 3 minutes 40 seconds

16 bucket size

- 214.265 seconds CPU seconds

- 2.796 seconds used by system

Or around 217 seconds, 3 seconds difference - 3:37

So, the larger bucket size didn't really help in this case.

That's how I'd interpret the numbers :-)

Link to comment
Share on other sites

First off to answer the original question at the start of the thread, you can certainly make Mantra consume more memory by increasing the bucket size. :)

From what I remember, the first timing number u is the time actually taken by Mantra to render. The second value is system overhead time I believe. It is valid to add both together but I usually look at the first set of times. Given that the two render times are pretty close.

As for why increasing the bucket size increased render times, no idea. Depends on the scene, materials, mantra options, etc.

Hello guys thanks for the response. but where do I get this output driver to increase my render bucket sizes. thanks .

Link to comment
Share on other sites

it is in the Mantra ROP (output) .. under the Rendering tab... dont have it in front of me to be more specific

thanks guys - and if it sounded like i was complaining sorry! i realise there will be a huge variance in this depending on the elements in a scene :-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...