PDA

View Full Version : 1 thread rendering 5 times faster than two?



Tom Wood
09-03-2003, 12:54 PM
Hi All,

I have a dual 2.4G Xeon system that is befuddling me. If I set the number of threads in the render options to anything more than one, it takes -longer- to render, sometimes as much as five times as long. I bought the dual processors expecting the reverse. What gives?

Thanks,

TW

Mylenium
09-03-2003, 01:09 PM
Well, the best guess would be that it is a problem with the underlying OS, since this takes actually care of the thread handling to a large degree. You should also check your BIOS settings... Perhaps even there may be a misconfiguration. It's really difficult without any further information. Perhaps you can be a bit more specific?

Mylenium

mattclary
09-03-2003, 02:01 PM
It sounds to me like it's only using one processor. Enable multiple threads, go to task manager and look at the performance tab. See if both CPU's are being used.

This could happen if you installed the OS with only one CPU present then added a second later on.

Tom Wood
09-19-2003, 04:43 PM
Attached is an image file that shows a sample frame, the render times for a single thread and a double thread (set in Layout Render Options), and the CPU usage history chart for both renders.

When using a single thread, the CPU usage peaked at 55%, when using two threads the highest it went was 60%. A single thread renders this frame in 6.6 seconds, but a double thread takes 9.1 seconds! Using the 4 setting takes 9.1 seconds, and the 8 setting is 9.2 seconds. Shouldn't dual (or higher) threads be faster? And shouldn't the CPU usage be near 100%?

Thanks,

Tom

PS: When anti-aliasing is off, the speed difference is more dramatic, in one case the single thread setting rendered five times faster than any of the multi-thread settings in Layout Render Options.

Elmar Moelzer
09-19-2003, 09:54 PM
Hmm, from the screenshots the performance- difference is not that huge (not five times as long rendertimes).
First thing I notice though is that you are using 2 segments to render a rather small frame and you have enough memory too.
So go to the camera- panel and set the segmetn- memory- limit to something higher until the info- field below shows only one segment.
Then please note the following things:
It takes some time to create the threads and this scene is pretty small and therefore renders fast anyway. So the benefit of two CPUs is not that much there.
In addition to this the field- rendering is also splitting up the frames so there is even less benefit.
What happens when you turn on multithreading in LW:
The frame will be split into two (or more depending on the amount of threads you have set) segments. Simillar to what the segment- memory- setting does if it is set to low.
Each segment is given to a CPU.
This takes a bit (not that much). Now each CPU renders one part of the frame. If one of them happens to finish earlier than the other (because little happens in the upper part of the image and the lower part is pretty polygon- heavy), it will have to wait for the second CPU to finish rendering. So sometimes using more than two threads can be usefull even if you have only got two CPUs.
Now as I said splitting the frame for multithreading takes its time. And it has to be performed for every segment and every pass. In addition LW renders a pass for every field (with one line dropped in each)
Your image only took 6.6 seconds to render. This means that you have basically got 0.3 seconds per pass.
So if setting up multithreading takes say 0.25 seconds for each pass and you have got 20 passes overall (counting in the segments as well here), you need 5 additional seconds for this.
This can in some cases diminish the benefit of multithreading.
Sometimes it is simply better to start two instances of LW and render half the frames with one CPU and the other hald with the other CPU.
Try again with a more complex scene and the benefit of the second CPU should be more visible.
Other than that it could only be that something is wrong with your system.
CU
Elmar

Tom Wood
09-20-2003, 11:06 AM
Thanks Elmar,

The default segment memory limit was 8, I raised it in small steps to 14, where the segments went to 1. Is there any advantage to going higher at this point?

That lowered the render time for 1 thread to 5.6 and for two thread to 5.7, so the dual processors still aren't helping much. However, if everything else checks out, and this is just the way it is, the idea of dual instances of LW open is interesting. When you say render half the frames on one CPU and the other half on the other, am I right to assume that that is something the OS would take care of? Or is that a specific instruction?

TW

(That fast and easy beveled hair is gone now - ten thousand polys! I'm learning the finer points of subpatch levels now...)

Elmar Moelzer
09-21-2003, 01:50 AM
Open the task- manager. There you can assign a CPU to a speciffic task.
CU
Elmar

colkai
09-22-2003, 07:02 AM
Originally posted by Tom Wood
Thanks Elmar,

The default segment memory limit was 8, I raised it in small steps to 14, where the segments went to 1. Is there any advantage to going higher at this point?


Personally speaking, I have my default at 32MB. You always want it so it renders in 1 segment.
Given your screenshots, you sure have enough memory to slap in 64MB segment there - If I recall correctly, LW won't use it if it doesn't need it. So setting 64MB when it only needs 16MB shouldn't have a performance hit.

Lightwolf
09-22-2003, 07:06 AM
Tom,
I think your scene just renders to fast for multi-processing to really kick in.
I bet LW spends more time on tasks that are single threaded (like preparing the geometry), than it does actually shading the polygons (which is multi-threaded).
Your scene seems to be too light, and the multi cpu overhead seems to eat away all potential gains.
Try your machine again with a heavier scene, may be some reflections and stuff, and you should notice a difference.
Cheers,
Mike

BeeVee
09-22-2003, 08:13 AM
Have a look at http://www.blanos.com/benchmark/ and pick a scene from there and see what speed your machine renders it at when compared with the others on there. All the scenes used for Benchmarks are included with LW...

B

Tom Wood
09-22-2003, 09:52 AM
Thanks Everybody,

That image is a single test frame of what will eventually be an animated character. I haven't done the lighting yet, so that may add to the load, but it won't get much more complex than that because the backgrounds will be a still image added in VTed.

Increasing the segment memory limit to 32 helped, but increasing it to 64 hurt performance. Turning on Hyper-threading in the BIOS helped a little too. (Now task manager shows four CPU graphs instead of two, those virtual Xeon processors act just like the real thing?)

I'll try some of the benchmarks.

Tom

Extent
09-22-2003, 06:30 PM
I doubt adding lights is going to effect your rendertimes much. Thats a very poly light scene. Throw something more complex at it scenery wise and you'll see the difference. many more polys than that, radiosity, proceduals, volumetric effects etc. Thats the only reason youre not seeing an improvement.

madrenderman
09-25-2003, 03:59 PM
to use in total dual cpu, you must use screamernet, dual screamernet for two processor, is only way to use all power of your dual processor.

during usual render if render is little or simple, the work of splitting calc are more expensive of a nromal rendering.