From: Greg Ercolano <erco@(email surpressed)>
Subject: Maya 2009 not using all processors
   Date: Wed, 08 Apr 2009 17:27:21 -0400
Msg# 1834
View Complete Thread (1 article) | All Threads
Last Next
If you're having trouble with the new Maya 2009 not using all
processors on eg. quad core machines, check out this article:

http://mattgadient.com/2009/02/22/make-maya-2009-use-a-multi-core-cpu/

I'm quoting the highlights of the article here, just in case
the link goes stale:

    Make Maya 2009 use a multi core cpu
    -----------------------------------
    [February 22nd, 2009]
    Article by: Matthew Gadien

    "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:

        [greg's ascii-art of their Task Manager showing 50% usage]

      ____________________________________________________________
     |  Windows Task Manager                                      |
     |____________________________________________________________|
     |                                                            |
     |  Cpu Usage    _________  _________  _________  _________   |
     |  .... ....   |         ||         ||         ||         |  |
     |  .... ....   |         || /\    /\||         ||         |  |
     |  .... ....   |    /\   ||/  \/\/  ||      /\/||         |  |
     |  #### ####   |/\_/  \  ||         ||   /\/   || /\  /\_/|  |
     |  #### ####   |       \/||         ||/\/      ||/  \/    |  |
     |  #### ####   |_________||_________||_________||_________|  |
     |    50 %       Cpu 1      Cpu 2      Cpu 3      Cpu 4       |
     |____________________________________________________________|


        "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."

He goes on to say (skipping some content):

        "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 [inside maya]:

		[Greg's summary of the article's screenshots]
		--------------------------------------------------------------

                1) Switch to the 'Rendering' submenu
		2) Under the 'Render' menu, click on "Batch Render"
		3) In the "Mental Ray Batch Render Option" dialog,
		   in the "Parallelism" section:
			3a) Set Render Threads: 8
			3b) Disable the 'Auto Render Threads' checkbox

		--------------------------------------------------------------
                [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:


        [greg's ascii-art of their Task Manager showing 100% usage]

      ____________________________________________________________
     |  Windows Task Manager                                      |
     |____________________________________________________________|
     |                                                            |
     |  Cpu Usage    _________  _________  _________  _________   |
     |  #### ####   |-----  --||--- -----||- --- ---||---------|  |
     |  #### ####   |     \/  ||   v     || v   V   ||     |   |  |
     |  #### ####   |         ||         ||         ||     |   |  |
     |  #### ####   |         ||         ||         ||         |  |
     |  #### ####   |_________||_________||_________||_________|  |
     |   100 %       Cpu 1      Cpu 2      Cpu 3      Cpu 4       |
     |____________________________________________________________|

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

The article goes on to note memory usage stays low, at about 1/4 use
in his case, and said he manually set the memory but it made little
difference in usage.

Then he talks about THREADS vs CORES, which you may find useful;
quoting again:

    "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 he then goes on to speculate /why/ 4 threads doesn't max out the cpu cores,
thinking it's one of two things [quoting again]:

    * "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."

My guess (erco here) is more the latter; rendering can be IO intensive at
times, so while IO is happening, the cpu is free to render, so having that
extra thread keeps the proc slammed while IO buffers are waiting to clear.


Last Next