Lying on the number of threads

Running an I7 2600k, Blender 2.63a auto-detects 8 threads (4 cores hyperthreaded).

I can render the test.blend benchmark in 4.73 average, with tiles 64 X 64 (Ubuntu 12.04, 64 bits, 32 GB RAM).

The strangeness happens if I set manually set the number of threads to 64 which lowers the render times to 4.50 seconds on average.

Anyone else can replicate the effect and/or has any explanation? :confused:

Thanks

I overclocked a bit and the difference is still quite noticeable: 3.93 seconds if I tell Blender to use 64 threads compared to 4.18 with only 8 threads…

Verified also on my laptop (Windows, i5 2 cores+hypertheading, 8GB RAM) 20.21 second on 4 threads and 19.31 on ‘64’ threads.

Don’t confuse cores with threads. Threads are deployed to the cores for rendering. Sometimes adding more threads can give you a quicker render but sometimes not. It all depends upon the scene. If the overhead to manage the thread takes more time than the execution of that thread then you will loose time. But in your test scene it looks like the overhead of setting up another thread works in your favor.

The time savings you are experiencing is not that great, approximately a second. On my dual core laptop your scene renders in 22.16 seconds using 2 threads. When I render using 64 threads I get a time of 21.27. So with 32 more times threading I get about a second less in render time.

This is a simple scene, try adding a character to the scene, or some particles. Something that may require additional processing like constraints, expressions and or modifiers. At some point the scale will tip and the cost of issuing that extra thread will exceed the savings and your render time will increase.

It is a nice feature to play with, however, I like seeing more buckets on screen when it renders too!

I would not treat this as a rule of thumb. Adding more threads divides the time spent by the CPU on what is a CPU-intensive workload. The number of threads should correspond to the number of cores, and then only if the total hardware can actually drive all cores “full steam ahead” without bottleneck; not often the case. You might be happier with a thread-count that is, say, one less than the number of cores.

I see…

The time savings you are experiencing is not that great

5% at best.

At some point the scale will tip and the cost of issuing that extra thread will exceed the savings and your render time will increase.

Yeah, I noticed that when using too many tiles for example. Now I understand why.

It is a nice feature to play with, however, I like seeing more buckets on screen when it renders too!

:smiley:

Thanks Atom. :slight_smile:

OK.

TY a bunch.

:slight_smile: