Hi all,
Sparked by an interesting thread recently, I’m trying to get a better handle on the new evaluation mode in Maya 2016+, and am looking for examples of where it has a positive impact.
Conceptually, I think it makes sense; if something can run in parallel across multiple CPU cores then it should.
Based on only this idea, these are some of the examples I’d expect to be a good fit.
For (3), I’d expect a 4x performance increase on a 4-core system.
But that’s not what I’m seeing.
evaluation=off: 107.23 ms
evaluation=parallel: 406.81 ms
evaluation=parallel, nodeType=untrusted: 421.11 ms
evaluation=parallel, nodeType=parallel: 407.96 ms
Here, 4 independent hierarchies, each of depth 100 driving a cube via a parentConstraint. Interestingly, a 4x decrease of performance on my 4-core system.
Here you can see the infinitesimal effect parallel mode has.
Compared with DG mode…
Notice the small orange strokes on the other threads in parallel, this is what they are:
My question to you is..
cmds.currentTime
a reliable metric for determining the effect of parallelism? What is better?If found that with currentTime(update=False)
, their timings are all equal, which is what I’d expect. Additionally, without refresh(suspend=True)
the timings are much higher and more similar, which I’d expect is due to the small difference in parallelism getting lost in the much higher cost of drawing.
I’m particularly interested in parallelism amongst multiple nodes, like hierarchies of objects with lots of connections, like control rigs, and less interested in parallelism within a single node.
In addition to examples, if anyone knows of any more references than the ones below, please share.
Reference
Best,
Marcus
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC8_z1c4fyBrpff42-D3GzdY1eGyG3r5b42ZAVXuT%3DNVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Thanks Joe.
The other piece to recognise is that there are lots of little things which will break Parallel evaluation and cause a fallback to DG — a big example of this is use of expressions, or python-based nodes… The key is that you have LOTS of independent nodes in the node graph that are not dependent on each other and that the evaluation manager can break them up and assign dependencies on a node-by-node basis. .. If you just have four independent hierarchies, then it can process those DG graphs on four threads, but there’s still a cost for the thread setup.
This all makes sense, but what I’m really looking for is an example of is. What is “lots”? How can I construct a scene that actually does improve? What are the ideal circumstances and how can I know?
I’d suspect (without looking at your scenes) that the reason you’re seeing faster DG times is the first piece.
I set branches = 100
and re-ran the example, and presto!
evaluation=off: 132.83 ms
evaluation=parallel: 131.48 ms
Equal timings. So equal in fact that it was suspicious.. so I set it back to branches = 4
and..
evaluation=off: 132.74 ms
evaluation=parallel: 133.52 ms
Now I’m unable to reproduce the initial results at all, even in a new instance of Maya or a different machine, even though those results were consistent every time I ran them in that one session. Curious.
Let’s ignore that example for now and move back to the start, what is any example of parallelism amongst multiple nodes? Even if it’s just a 10% increase in FPS.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC8_z1c4fyBrpff42-D3GzdY1eGyG3r5b42ZAVXuT%3DNVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM33%3Da5e9KiUFGBtQfsTA5wp1gWjK-j%2Bv32sy_RPAx4Y4H6n4Q%40mail.gmail.com.
I’ve added another method of measuring performance.
profile1
- Measure by repeatedly calling cmds.currentTime(time, update=True)
and keeping track of time. Lower is better.profile2
- Measure by playing back for a fixed set of time, e.g. 3 seconds, and query what frame you end up on. Higher is better.profile2
takes into account viewport refresh, whereas profile1
does not.
Now I’m looking for more scenes, anything that can produce a measurable effect of parallelism.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC8_z1c4fyBrpff42-D3GzdY1eGyG3r5b42ZAVXuT%3DNVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA9Hf%3DNDp%2By2wHR73MFBso%3Dz6VzopbKT2eitr00JgzKtg%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA9Hf%3DNDp%2By2wHR73MFBso%3Dz6VzopbKT2eitr00JgzKtg%40mail.gmail.com.
--
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPaTLMQgW05XNc3L8HthqWjRdnVTausW%3DwDMc3H2ZJOW21q5Qw%40mail.gmail.com.