Community
Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Arnold Log - Thread blocked

4 REPLIES 4
Reply
Message 1 of 5
Xaia
446 Views, 4 Replies

Arnold Log - Thread blocked

Hi there beautiful people!

I am doing some render speed tests on different machines and I was wondering what exactly means "Thread blocked" appearing in the log.

For instance - My test scene contains one big terrain divided in to two pieces, one with 3 subdivs (66m poly after subdivisions) and second one with 5 subdivs (38 milion). Simple shader and a flat dome light. Samples 3/1/1/1/1. 8 tx textures and displacement.

My log is showing this

 top session self-times by category 00:02:27 14882MB | thread blocked 1:31.70 (63.65%) 00:02:27 14882MB | displacement 0:21.96 (15.24%) 00:02:27 14882MB | /terrain_midpoly_02_grp/terrain_midpoly_02:geo_grp/terrain_midpoly_02:terrain_01_geo/terrain_midpoly_02:terrain_01_geoShape 0:15.71 (10.91%) 00:02:27 14882MB | /terrain_midpoly_02_grp/terrain_midpoly_02:geo_grp/terrain_midpoly_02:terrain_02_geo/terrain_midpoly_02:terrain_02_geoShape 0:06.24 ( 4.33%) 00:02:27 14882MB | AiTextureHandleAccess 0:09.80 ( 6.81%) 00:02:27 14882MB | BVH::build 0:04.81 ( 3.35%) 00:02:27 14882MB | triplanar 0:02.12 ( 1.47%) 00:02:27 14882MB | subdivision 0:02.09 ( 1.45%) 00:02:27 14882MB | /terrain_midpoly_02_grp/terrain_midpoly_02:geo_grp/terrain_midpoly_02:terrain_01_geo/terrain_midpoly_02:terrain_01_geoShape 0:01.37 ( 0.95%) 


What is causing thread blocking? Is it normal behavior?


Best

Dawid

Tags (1)
Labels (1)
  • log
4 REPLIES 4
Message 2 of 5
Stephen.Blair
in reply to: Xaia

It means some threads are waiting for other threads to finish. For example, a rendering thread may have to wait for subdiv and displacement to finish before rendering starts again.



// Stephen Blair
// Arnold Renderer Support
Message 3 of 5
thiago.ize
in reply to: Xaia

This is probably normal.

Ideally work can be split up among all threads (parallelized) so that on an N-core machine you can render N-times faster. But sometimes the work cannot be parallelized and only a single thread can do this work. When that happens the other threads have to wait on this work to finish and are "blocked".

A simple real-world example is that if it takes one person 9 months to build a house, you might be able to hire 9 construction workers to build a house instead in 1 month (that indicates perfect parallelization). However if it takes someone 9 months to have a baby, you can't divide that work amongst 9 people and have the baby in only one month -- that's a serial task. Likewise, in computer programs there are some tasks that can be easily parallelized and others that are much trickier or even impossible to do so.

We try to improve the parallelization of arnold, but as you can see from these results we haven't yet made it 100% parallel in all situations.

If the subdivision time is an issue for you, if you can break the mesh into multiple smaller meshes, that might help it to scale to more cores.

Message 4 of 5
Xaia
in reply to: thiago.ize

Thank you, that makes sense.

Subdivision time wasn't an issue in this case, took only 2 seconds. Displacement took 21 seconds. Reading the textures 9 seconds.

Actual rendering took 10 seconds.

I was trying to do the math to get this 1:31s somehow but couldn't find anything even close to that number. What else could be "blocker" in this case?


Message 5 of 5
thiago.ize
in reply to: Xaia

If you really want to know, you can write out a profile.json file that you can then load up in google's Chrome browser and then see what is causing the threads to be blocked. Details are here: https://docs.arnoldrenderer.com/pages/viewpage.action?pageId=71013068 and here https://docs.arnoldrenderer.com/pages/viewpage.action?pageId=86806604.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums