mattgadient.com

Make Maya 2009 use a multi core cpu

A small shocker using Maya on a Quad-Core Intel processor was that CPU usage by default was about 50%. Yes that’s right FIFTY PERCENT. It looked similar to this:

Maya using only 50% CPU usage.
Maya using only 50% CPU usage.

This was a little disappointing – Maya 2009 basically caused another dual-core machine to grind to a halt, and was only using about half the potential of the Quad-Core.

This was my first time actually using/seeing Maya (I was helping out someone else who needed some rendering distributed), so I searched around. It took forever, but I finally came across the fix.

If you’re using the default Maya Software renderer, there’s an option in the Render Settings menu, but I wont go into that here. The individual I was helping needed MENTAL RAY to be used (instead of Maya Software Renderer), and there wasn’t an equivilent option in that menu.

If you’re using Mental Ray, this is where you make the change:

First, Change the selection in the drop down box located at the top left to RENDERING.
First, Change the selection in the drop down box located at the top left to RENDERING.

Next, find the menu in the top menu bar called "Render". Click it, and then click the little option box beside "Batch Render" (look where the arrow is pointing)
Next, find the menu in the top menu bar called “Render”. Click it, and then click the little option box beside “Batch Render” (look where the arrow is pointing)

With that done, you should see a new option screen that looks like this:

Unselect the "Auto Render Threads" box and enter your own number of threads. For a Quad-Core I needed to use 8 to max out the processors.
Unselect the “Auto Render Threads” box and enter your own number of threads. For a Quad-Core I needed to use 8 to max out the processors.

This is the trick!

By default, Maya chooses the threads on it’s own. It actually appears to select 4 on a quad-core by default, but it doesn’t max out the cpu usage on each. Changing that number to 8 queues up threads, which pegs the processor to full usage, and speeds up the rendering considerably.

Of course, with all 4 cores maxed, everything else on the computer will be VERY SLOW – even typing out an email, I was able to type an entire sentance out before it appeared on the screen. You will not even want to try doing other stuff while it renders in the background – trust me. On the plus side, more renders happen. The stuff being rendered in my case was doing about 3 renders per minute for the section it was in (a simple section), and it jumped to between 5-6 per minute – not *quite* double, but still quite the increase.

Just for completeness, this is what Task Manager looked like in the end:

Finally, with 8 threads selected, the CPU usage is pegged at 100%
Finally, with 8 threads selected, the CPU usage is pegged at 100%

 

A few little things to note:

  1. Memory usage stayed pretty low in my case (2GB RAM out of an 8GB 64-bit system). I did manually set the memory, but it made very little difference in usage, if any.
  2. This change talks about THREADS vs CORES. There is a difference, although for our purposes it doesn’t really matter. THREADS are basically like a process, and the operating system sends out threads to cores based on what core is the least busy at the time. We set up 8 threads in the above, so assuming they distribute evenly, each core should be getting fed 2 threads consistantly. We can’t specify CORES with Mental Ray (as far as I can tell), but it doesn’t matter – there wouldn’t be an advantage anyway, since enough threads will fill all the cores up regardless. The only real benefit to actually being able to specify cores would be that if you wanted to you could choose 3 cores, filling them up and leaving the 4th core alone (the system would probably remain snappy with 1 core untouched by Maya, although you’d be rendering at around 3/4 of the potential).

And finally, a little speculation as to WHY 4 threads (what appears to be the default) doesn’t max out all the CPU cores… My best guess here is that it’s one of two things…

  • Each thread opens, does something, then closes, and the processor isn’t used much between the time a thread closes and a new one opens.
  • Each thread ends up waiting on other things (memory reads/writes) which leave it idle.

Either way (whether it’s one of those things, or something else entirely), setting the threads to 2X the processor cores makes full use of the CPU, which is really all we cared about anyway.

  • JoelC

    Thanks heaps, I was looking all over for this (which in the end was simple). All other blogs threw me off with the side tracked conversations and no real answers. Weirdly I have 2 cores, changed the -rt 2 to -rt 4 and got my 100% cpu

  • Anonymous

    hey Thanks man …Your our hero

  • Anonymous

    hey thatnks you’re a hero….You saved us…
    100 %

  • recyclops

    I am rendering particle cloud on a dual core. My particle cloud flickers i did some reasearch on the web and the resulting answer was not the same as my problem. My cloud are lite with 1 ambient light and no change and live forever. But in renders i get value changes in brightness on them…it pops or flickers…Do you think rendering on multiple core would affect the render?

  • James

    Thanks for this! I am using an i7 2600k over clocked to 5ghz, and I was upset at how slow it was rendering. I set it to 8threads, and hahaha SOOOO much faster! However, impossible to do anything else, so I set it to 7 threads, and now I can still use the computer for .. this for instance (it’s rendering right now) without any problem, and render full-out on 7 cores! It’s on frame 8 already, in the time it would have taken to do 1 frame.

    Awesome.

  • MK

    Great, what i only need now is make maya use more cpu power on prerender, or don’t tell me it uses GPU for preview, because that will be lame…

  • PeterG

    Thanks for the great info. I’m running Maya 2010 on a Mac 8 core (2 quad core Intel Xeons). TUrning off the “auto detect” and setting the core usage to 8 get me up to %50 CPU usage during my batch renders and doubling it to 16 got me about %100! And my machine isn’t at all locked up form other simple tasks. Nice!

    It was so frustrating not knowing why my batch renders were taking several times longer than my single frame test renders (which were also only using a fraction of the machine’s power.

  • Dennis Volkerts

    Jon :@Dennis Volkertsany updates? I myself have a core i7 860, with 8gb ram, and i barely see 3.3 used in my rendering, i use batch render settings, applying the 16 threads, and massive scenes over populated to cause tension in the rendering process, but my memory usage sucks…. can disabling the pagefile potentialy help this matter?

    yes i have an update. 🙂
    well… a solution that worked for me.
    I used Ika’s Renderview render. a script you can download at: http://www.creativecrash.com/maya/downloads/scripts-plugins/utility-external/misc/c/ikas-render-view-renderer.
    It seems to work great! 😀 using 99 of its CPU.
    the only problem is that it renders all your frames in the maya renderview, so you cant use maya while its rendering.
    good luck guys! squardis@hotmail.com

  • keitaro3660

    wow!! thx for the tips!!
    i using core i5 and mental ray..
    i was wondering why maya only use 50% when render? 2 of the ‘cpu’ seems untouch. so i search google and found this site.

    IT’s WORKING!!! i change it to 8 thread, and now my maya use 100% ~
    my render is faster, not 100% faster though

  • Jon

    @Dennis Volkerts
    any updates? I myself have a core i7 860, with 8gb ram, and i barely see 3.3 used in my rendering, i use batch render settings, applying the 16 threads, and massive scenes over populated to cause tension in the rendering process, but my memory usage sucks…. can disabling the pagefile potentialy help this matter?

  • Dennis Volkerts

    well it doesnt work for me! whatever i try is stays at used 20% of its CPU. If i just use maya window rendering it takes a minute.
    the batch render 9 minutes.
    i filled in 50 threads, but almost no changes…
    i have 8 processors, 64bit, maya 2009. 24GB of RAM
    HELP!!!! its tooooo slow.

    Is there something like a plugin to render just in the maya window the whole sequence?? mail: squardis@hotmail.com

  • Touqeer

    Hey,

    I have Maya 2010 and only 1 core takes the load upto [100%] the fullest, while the load on the other is 1-5%, any setting I can set to make maya use both cores/threads…?

  • Kieran:

    I’m not sure what might be going on. If the CPU usage has gone up, it would make sense that it’s got to be doing *something* more, but if your results aren’t reflecting that, I’m really not certain.

    You could watch the resource meter, and double check to make sure it’s staying at 100% the majority of the time (if it’s often dropping for significant periods, it’s possible that the hard drive or something else is the main thing bottlenecking your renders). Also, obviously make sure you’re rendering the same scenes when doing the comparison.

    It would be interesting to know what processor you were using also. This would just be a theory if it were happening on an i7 processor, but the theory would be as follows:
    -“Auto Render Threads” option maybe used 4 threads (despite 2 being shown in the greyed out box)
    -Manually setting it to 8 simply would have then filled up work for the 4 HT “cores”.
    -Mental Ray perhaps doesn’t benefit much at all from Hyperthreading.

    If that theory were correct (and really I’d be making a LOT of assumptions, so I’d only deem it a rather small *possibility*), then it could account for 8 threads not having any significant impact on output despite the CPU usage going up because of the HT “cores” not having much benefit.

    In any case, I’d play around with the threads, trying 4, 8, 16, etc. If there’s really no difference in rendering output, just use whatever keeps the computer usable during rendering, or stick with the default. If Mental Ray doesn’t benefit from HT, then disabling it from within the BIOS and then playing with the threads would be an interesting test to see what results might be.

  • Kieran

    Hi there and thanks for the info.
    I’m using a quad and tried your fix (from default 2 to 8) and the cpu went to 100% but the render took exactly the same amount of time as it did when it was set at 2. Any ideas?

  • Olive

    what about accelerating Playblasts? my cpu is a core2quad Q9550 and Maya only uses 30% of the ressources in Maya 2008

  • jay

    My cpu also drops to around %50 if i use 8 render threads. This is on a core2 quad 2.4. I found however if i drop the threads to 2 it stays at %100 almost the whole way through.

  • GP

    The question of the number of threads to use isn’t answered just by how many cores your CPU has, it also depends on what specific CPU it is. At the time of writing I believe that the only quad core CPU that allows Hyperthreading is the Intel Core i7.
    Basically what hyperthreading does, is allowing one core of the CPU to handle two processes at once. This is particularly useful when a certain thread isn’t fully loading the core, in which case hyperthreading allows you to use the core to its full potential.
    This also means that for older Intel quad cores (unfortunatly I’m not certain about the AMD models), 4 threads is the most they’ll do at a time. Hyperthreading is also present on some older single core Pentium 4 models and the Atom processor (though running Maya on an Atom based system is probably a downright bad idea).
    Under windows XP (and I think Vista aswell, though I don’t have it installed to confirm), the task manager (the alt+ctrl+del menu) will show each available thread as an individual CPU, so a Core i7 will show up as having 8 CPUs, while older quad cores show as 4.

    I’ve played around a bit with my settings (testing 4, 8, 16 and 32 threads on a Core i7 920, clocked @ 3885MHz), the CPU load seems to remain the same with 8 threads and above, but was clearly lower with 4. This is what I would expect based upon the above explaination of Hyperthreading.
    For some more info: http://en.wikipedia.org/wiki/Hyper-threading

  • chester

    thanks for the hint. I’m rendering some projects for a friend so I’m not that familiar with Maya. When I changed the threads from 4 to 8 my CPU usage went from 100% to 50%. Any ideas on why this might be, or how I could make Maya render faster?

    • chester:

      I’m not sure why raising it lowered the cpu usage in your case. It should be increasing it. You could try bumping it up further (to 12 or 16) and see if that makes a difference. On the other hand, if you’re using a 2-core CPU or something, you may want to try lowering the threads used instead (try 4 and then 2)

      Also note that if you’re not using Mental Ray as the renderer (for example if you’re using the default Maya Software renderer instead), the options are elsewhere. I haven’t played with them for the default software renderer, so I probably can’t be as much help there (I’m on a different machine at the moment so I can’t look it up).

      Otherwise, if you’re using Mental Ray, have a quad core, and the increase in threads is actually lowering your cpu usage, I’d probably look into something else bottlenecking you – either not enough RAM available or a hard drive that’s thrashing about.

      Good luck!