POV-Ray : Newsgroups : povray.general : Threads and rendering performance Server Time
4 Dec 2024 13:58:43 EST (-0500)
  Threads and rendering performance (Message 1 to 3 of 3)  
From: Chris R
Subject: Threads and rendering performance
Date: 30 Nov 2023 09:25:00
Message: <web.65689af546bcd7a113355b545cc1b6e@news.povray.org>
I recently got a new laptop where I do my renders and noticed an issue where it
would just completely freeze up, to the point where I had to do a hard
power-down to get it to respond while rendering with POV-Ray.  It appeared to
only happen if I was doing a large render, (multi-day even), and tried to do
something else on the machine while it was running.

So, I looked into limiting the number of worker threads in POV-Ray to make sure
there was always some spare capacity to do other things without triggering
whatever Windows 11 bug is causing this.  My machine has 14 cores and 20 logical
processors.  Running with the default settings, it would peg all 20 logical
processors at or near 100% when doing a large render.  Doing some experiments I
verified that worker threads take up one logical processor (vs cores).  I ended
up settling on a new default using 12 worker threads instead of the max, which
based on performance monitoring tools runs at about 50% overall CPU utilization.

The odd thing I've noticed, though, is that my renders are not significantly
slower.  In fact, the holiday scene I posted recently took almost 4-days to
render at full bore, but in a re-render with some settings that should be
slowing it down, its about 71% complete after 16 hours, using only 12 workers.
(Note: this is anecdotal evidence; it's possible the last 29% of the pixels are
significantly slower to render due to more glass reflections, etc.).

So, now I'm wondering if there could be some thread interactions that are
getting overwhelmed when using all of the cores, or if using all of the cores
causes too much heat, so the machine is slowing things down internally to
compensate, or something else?

I just thought it was interesting and maybe someone else has experienced this
before who might have some insight into it.

-- Chris R.


Post a reply to this message

From: William F Pokorny
Subject: Re: Threads and rendering performance
Date: 1 Dec 2023 08:57:34
Message: <6569e64e$1@news.povray.org>
On 11/30/23 09:23, Chris R wrote:
> So, I looked into limiting the number of worker threads in POV-Ray to make sure
> there was always some spare capacity to do other things without triggering
> whatever Windows 11 bug is causing this.  My machine has 14 cores and 20 logical
> processors.  Running with the default settings, it would peg all 20 logical
> processors at or near 100% when doing a large render.  Doing some experiments I
> verified that worker threads take up one logical processor (vs cores).  I ended
> up settling on a new default using 12 worker threads instead of the max, which
> based on performance monitoring tools runs at about 50% overall CPU utilization.
> 
> The odd thing I've noticed, though, is that my renders are not significantly
> slower.

I think Jerome, now a long time ago, did some detailed analysis on the 
value of threads overs cores. I cannot immediately find it... I believe 
it showed there is some, but not great value to POV-Ray where threads 
exceed the number of physical cores. I think he showed Something like a 
gain of another 10-15% in performance.

This aligns more roughly with my own experience too. Physical cores 
matter most, but it is usually still a gain to use most or all of the 
available threads (apparent / logical cores).

Bill P.


Post a reply to this message

From: Le Forgeron
Subject: Re: Threads and rendering performance
Date: 15 Dec 2023 13:39:14
Message: <657c9d52@news.povray.org>
Le 01/12/2023 à 14:57, William F Pokorny a écrit :
> On 11/30/23 09:23, Chris R wrote:
>> So, I looked into limiting the number of worker threads in POV-Ray to 
>> make sure
>> there was always some spare capacity to do other things without 
>> triggering
>> whatever Windows 11 bug is causing this.  My machine has 14 cores and 
>> 20 logical
>> processors.  Running with the default settings, it would peg all 20 
>> logical
>> processors at or near 100% when doing a large render.  Doing some 
>> experiments I
>> verified that worker threads take up one logical processor (vs 
>> cores).  I ended
>> up settling on a new default using 12 worker threads instead of the 
>> max, which
>> based on performance monitoring tools runs at about 50% overall CPU 
>> utilization.
>>
>> The odd thing I've noticed, though, is that my renders are not 
>> significantly
>> slower.
> 
> I think Jerome, now a long time ago, did some detailed analysis on the 
> value of threads overs cores. I cannot immediately find it... I believe 
> it showed there is some, but not great value to POV-Ray where threads 
> exceed the number of physical cores. I think he showed Something like a 
> gain of another 10-15% in performance.
> 

Be my guest:

https://wiki.povray.org/content/User:Le_Forgeron/vault/Compilation

See the bottom of the page


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.