PDA

View Full Version : Wait a sec... where's my multithreading?? usual thread trick does not work...



TheDynamo
09-20-2005, 12:42 PM
I'm running lightwave 8.3 on a dual mac G5 2GHz computer with 2GB memory. I've got the threads to 8 right now under render settings and I assumed that the computer was utilizing both processors. A friend of mine pointed out a nice little app that you can run under a terminal window called "top" that you just type the word in and you see the system load in percentage. Well at the top while it was rendering it only listed Lightwave using 46% of the total processing power...

That can't be right :thumbsdow

Can I get some help here fellas? Thanks!

Scott_Blinn
09-20-2005, 01:06 PM
I'm running lightwave 8.3 on a dual mac G5 2GHz computer with 2GB memory. I've got the threads to 8 right now


Shouldn't you only be using one thread per CPU?

toby
09-20-2005, 05:12 PM
Shouldn't you only be using one thread per CPU?
Nope!
Setting threads is not how many cpus you have, but how much to divide up the frame. For example if you have a heavily subdivided ocean water object and raytraced reflections on, but your sky is clear, when you set it to 2 threads 1 cpu gets the top half and the other cpu gets the bottom. So the sky renders in a second, and the ocean takes ten minutes on one cpu.

It can also be more efficient to send as much data to the cpus as possible, to ensure that the cpus are never waiting for data. I recently had to spend a week rendering a radiosity animation, and I found it most efficient to render with 2 copies of Lightwave rendering at 8 threads each.

But it takes time to split up the data, some data takes longer to split than others, and lots of processes are not multi-threaded at all, like 'raytrace optimization' or most post-process filters. So the only way to know what's the fastest thread setting is to test them. Think about what parts of the render need the most processing power and you can predict what you might need.

So to answer the original question, your render may have finished most of it's threads, or may have been between AA passes, when it's doing things that aren't multi-threaded, or during a post process. You never get 100% usage 100% of the time -

TheDynamo
09-20-2005, 06:12 PM
Not getting 100% I can understand but it looks like it was only really using one processor without going to use the second. Is there a setting in Tiger that I'm missing maybe? After Effects uses about 80% of total system resources (leaving the other 20% for system tasks and such). I'm just wondering if I need to set up a "render farm" to get both processors cooking on a render, which would stink :P.

-Dyn

toby
09-20-2005, 10:31 PM
You mean it used one processor for the whole render? I haven't used the 'top' thing, I use the activity monitor, maybe it reads differently?

What's your scene like? Have you tried different scenes, or compared render times? What does the 'top' thing read if you set it to one thread?

TheDynamo
09-21-2005, 10:47 AM
"top" is just something you can type in a open terminal window that tells you how much the resources are being taxed on your computer. I can give a specific example here:

Adobe After Effects used a peak of 160% during a render yesterday. Translated, it used both processors while rendering. In it's own weird way it registers one processor at being 100% so it reported that both processors were being used.

Lightwave however using the same program rendered a flying logo scene using PLD 7 pass antialiasing with motion blur at 8 threads only used 84% at it's peak.

Top does provide another number at the top of it's dialog that reports a more logical percentage for active processes using 100% as the total. Using this number the active processes were about 80% and 40% ish respectively. I'll look through render settings again but it all looks good from LW's persepctive.

I'm just concerned that it does not seem to be utilizing the second processor when other apps on the computer do.

If anyone else wants to try this just go under your utilities folder in "Applications" and open a terminal window. Once that's done, type "top" (without quotes) and then do a couple of renders. I'm hoping I'm not crazy, well not too crazy :)

-Dyn

I'll post render test percentages in the next post using Top.

TheDynamo
09-21-2005, 11:09 AM
Single Frame F9 Render: PLD 7Pass, Motion Blur, Gaussian Sharp

46% out of 100% 1 thread

55% out of 100% 2 threads (both processors being used)

69% out of 100% 4 threads (both processors being used)

65% out of 100% 8 threads (both processors being used)

Single frame renders do take advantage of both processors BUT.....

=================

Render Scene F10 Render: PLD 7Pass, Motion Blur, Gaussian Sharp

46% out of 100% 1 thread

39% out of 100% 2 threads

37% out of 100% 4 threads

41% out of 100% 8 threads

None of the renders using the full render scene F10 utilize both processors at all during their renders.... what's up with that?!? :cursin:

-Dyn

marble_sheep
09-21-2005, 12:36 PM
Are you using any plugins in your scene, like hypervoxels? Certain things in lightwave don't know how to multithread. Whenever I render (F9 or F10, doesn't matter,) I usually get around 170-180%. This is assuming, however, that there is enough data going to the processors in a steady stream for it to matter. Sometimes, I've noticed that if I have a scene that renders really quickly each frame, the percentage drops.

Maybe you could zip your scene and post it here? :confused:

TheDynamo
09-21-2005, 12:59 PM
*blush* I have to admit this is my first lightwave animation not related to a tutorial. Primarily I have been an After Effects artist for 6 years so 3D is still rough for me.

This is for a client that I cannot disclose until it's on-air, luckily their logo is not part of this animation ;) This is possibly one of the simplest flying logos I've made in a long time, they wanted cheesy gameshow, they got cheesy gameshow. I just know it felt good to do this in 3D for a change ;)

-Dyn

marble_sheep
09-21-2005, 01:59 PM
Ah ha! I see the problem. Like I suspected, the scene isn't complicated enough to fill the processors with constant data. For whatever reason, Lightwave cannot multithread the stuff it does in-between antialiasing passes. So, if goes through each pass faster than it can fill up the processor, it will look like it is not using the processor effectively. Well, that's the basic version based on what I've noticed. I have no explanation for it ;) So... at least it means your Lightwave isn't broken! :thumbsup:

TheDynamo
09-21-2005, 02:55 PM
Heh guess I'll have to make the cheese more complicated to err... use both processors :D Thanks for the assist!

-Dyn

toby
09-21-2005, 10:24 PM
Yea, it seems to stop and change what it's doing before the procs have a chance to get going :D
I clicked on radiosity and I got a spike at 170%. It took a second or two to ramp up. This scene actually renders faster with one thread, because there are so many things it's doing that aren't split-able. Like splitting the data :). It has to do that before every pass, and it takes a some time. It's kinda like getting in a car just to go across the street.

TheDynamo
09-22-2005, 10:12 AM
Thanks for helping me on my primitive attempt at a 3D logo ;) I just kind of had it dropped in my lap and was asked to make an extrusion of it and then animate it cheesy game-show style. It was at that point that Lightwave turned into a rather advanced version of After Effects :D

I can imagine how hot everything looked with radiosity on 8~

-Dyn