Author Topic: Rendering at 40fps slowwww....PC Upgrade Suggestions?  (Read 2463 times)

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #15 on: October 23, 2018, 06:30:18 PM »
Effects that do not overlap in time can be rendered concurrently.  Its just like if you wanted to paint the north wall in a room white and then paint a red circle in the middle you can't paint the red until you are done with the white.  But another person could paint the south wall all day long.

I've thrown computers in the trash that have better specs than that.

Offline nmiller0113

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • The Miller Lights
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #16 on: October 23, 2018, 06:47:21 PM »
Effects that do not overlap in time can be rendered concurrently.  Its just like if you wanted to paint the north wall in a room white and then paint a red circle in the middle you can't paint the red until you are done with the white.  But another person could paint the south wall all day long.

I've thrown computers in the trash that have better specs than that.
Haha, fair enough regarding the computer :) I'm not saying I'm proud of the thing.  TBH, I'm a Mac user and all my Mac's are 100x more powerful and newer than this windows machine (Intel NUC) I've only ever used to run other lighting products like Madrix which only support Windows.  I'm also not a gamer so I've never had a reason to have a beefy Windows machine either.  The problem is...I made the mistake of upgrading all my Mac's to Mohave before checking to see xLights support...DOH!

Your analogy gave me an epiphany actually.  It's not about the models it's about overlapping effects within the same models...as the rendering is related to the effects...not the models, thus the serial issue.  So that also answers my threading question...kinda...I am still curious if multiple threads are used to process a single effect or whether it's limited to just one.

I also see a reason I was noticing increased rendering times more recently as my last two sequences had multiple overlapping effects across the same model group.  It is good to know all of this as now I'll make some improvements and monitor rendering more closely to find places to be efficient.  Once I start pegging my CPU usage I'll really know how bad my computer is and then determine what is tolerable :)

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #17 on: October 23, 2018, 07:21:28 PM »
Run check sequence. Some causes of slow rendering is flagged by it. Just fixed someone’s issue on zoom.


Sent from my iPhone using Tapatalk

Offline nmiller0113

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • The Miller Lights
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #18 on: October 24, 2018, 12:57:02 AM »
Run check sequence. Some causes of slow rendering is flagged by it. Just fixed someone’s issue on zoom.


Sent from my iPhone using Tapatalk

Thanks Keith.  I'll try that out.  Also, thank you for all your input and guidance.

I hope my epiphany in my last response was correct :) I believe I have a pretty good understanding now...though I'm still curious on my number of threads question.  But I believe I've exhausted my limit of questions, by far, for the month...haha...but I'm sure I'll know eventually :)

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #19 on: October 24, 2018, 06:14:59 AM »
Personally I don't know exactly how the threading works.  Dan wrote a good portion of it.  So when you want to know more than I know and you only have 2 cores it feels unnecessary to me...lol.

Offline nmiller0113

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • The Miller Lights
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #20 on: October 24, 2018, 09:13:38 AM »
Personally I don't know exactly how the threading works.  Dan wrote a good portion of it.  So when you want to know more than I know and you only have 2 cores it feels unnecessary to me...lol.
Haha, ok.  Can't argue with that logic :)

Offline dkulp

  • Supporting Member
  • Hero Member
  • *
  • Posts: 812
    • View Profile
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #21 on: October 24, 2018, 12:29:04 PM »
I can answer the threading questions...   :)   

In xLights, there are two pools of threads used during rendering.   The first pool is a very large pool of threads used for rendering the models and groups.  Basically, if you bring up your master view for the sequence, everything you see there is assigned a thread.   The stuff Gil talks about is handled in this pool.   If the thread for a model depends on (is rendered later in the master view AND shares channels) something above it (for example: the model is part of a group that is rendered above it), then that thread does need to wait for the group to render any given frame before it renders it's frame.   Thus, slow rendering effects on the large model groups can bog down the rendering of all the models in that group.  They pretty much sit around waiting.   Also, if the "Max Grid Size"  for a group is large, many effects will take a lot longer to render on that group.   If you need to speed up rendering for groups, turn that down.   A "Butterfly" on a 800max group takes 4x longer than one on a 400max.   Maybe turn them down for "most of the year" while sequencing and then turn them up as you get closer to final renders for your show to get them to look a little better.

The second thread pool is much smaller:  the number of "threads" that your CPUs support.  For example, my Mac is a 6 core, 12 thread CPU so the size is 12.   This thread pool is used for very short running mathematically complex but easily splittable computations for various effects.   The purpose of this pool is to COMPLETELY utilize all the cores in your machine for effects that can do it.   For example, rendering a Butterfly effect on a large matrix can easily be split into multiple parts as none of the pixels being rendered depend on any other pixel.  If you have  2 cores, a big butterfly would be split up to use both cores while rendering that effect.   This can help speed up rendering in some cases.  HOWEVER, many (most) effects cannot leverage this pool.   For example, circles cannot as we cannot render two circles at the same time if they are overlapping.   Also, this pool was only introduced a few versions ago so we haven't really gone through all the effects and such to get them using it.   Another example is "Snow Flakes".  In theory we COULD render each flake separately.  However, the way its implemented right now makes it impossible. Thus, we have to re-write the snowflakes effect in order to take advantage.  It's not something I've had time to do.   
Daniel Kulp
Framingham, MA

Offline nmiller0113

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • The Miller Lights
Re: Rendering at 40fps slowwww....PC Upgrade Suggestions?
« Reply #22 on: October 24, 2018, 01:22:27 PM »
I can answer the threading questions...   :)   

In xLights, there are two pools of threads used during rendering.   The first pool is a very large pool of threads used for rendering the models and groups.  Basically, if you bring up your master view for the sequence, everything you see there is assigned a thread.   The stuff Gil talks about is handled in this pool.   If the thread for a model depends on (is rendered later in the master view AND shares channels) something above it (for example: the model is part of a group that is rendered above it), then that thread does need to wait for the group to render any given frame before it renders it's frame.   Thus, slow rendering effects on the large model groups can bog down the rendering of all the models in that group.  They pretty much sit around waiting.   Also, if the "Max Grid Size"  for a group is large, many effects will take a lot longer to render on that group.   If you need to speed up rendering for groups, turn that down.   A "Butterfly" on a 800max group takes 4x longer than one on a 400max.   Maybe turn them down for "most of the year" while sequencing and then turn them up as you get closer to final renders for your show to get them to look a little better.

The second thread pool is much smaller:  the number of "threads" that your CPUs support.  For example, my Mac is a 6 core, 12 thread CPU so the size is 12.   This thread pool is used for very short running mathematically complex but easily splittable computations for various effects.   The purpose of this pool is to COMPLETELY utilize all the cores in your machine for effects that can do it.   For example, rendering a Butterfly effect on a large matrix can easily be split into multiple parts as none of the pixels being rendered depend on any other pixel.  If you have  2 cores, a big butterfly would be split up to use both cores while rendering that effect.   This can help speed up rendering in some cases.  HOWEVER, many (most) effects cannot leverage this pool.   For example, circles cannot as we cannot render two circles at the same time if they are overlapping.   Also, this pool was only introduced a few versions ago so we haven't really gone through all the effects and such to get them using it.   Another example is "Snow Flakes".  In theory we COULD render each flake separately.  However, the way its implemented right now makes it impossible. Thus, we have to re-write the snowflakes effect in order to take advantage.  It's not something I've had time to do.

WOW, thank you Dan!  That was super helpful and educational.  I really appreciate the insight!