Announcement

Collapse
No announcement yet.

Killing CPU Time

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Killing CPU Time

    I just build a new system with an Intel 9700k, i.e. the latest generation of Intel processors and a relatively high-end processor unless you want to plunk down $1k for the processor alone. However, HS3 is constantly consuming between 10% and very frequently (every few seconds) 80% of CPU time. It drags down my whole system. that also runs BlueIris, etc. Does anybody else have such problems?

  • #2
    Yes , I have spike of hs process that goes to 22 or 50 or even 100 ramdomly.

    can’t say what is the cause of this. Maybe when the system is cheking my triggers based of ‘’automatic trigger at x time ‘’. But that would be surprising.

    i have maybe somewhat 340 events . Don’t know for others with more ‘’active’’ events?

    Comment


    • #3
      Waited ~5 mins . I was able to capture a spike . And look at the cpu time. Versus the time the machine has been restarted.
      Attached Files

      Comment


      • #4
        Another one . Waited 15 sec.

        Again, cpu time value is quite really high!

        rjh any thoughts?
        Attached Files

        Comment


        • #5
          As long as it's not staying high does it matter? Opening Notepad pegs my CPU for a couple of seconds but it settles back down. Check your HS3 scripts as this is where most high CPU usage is derived.
          -Rupp
          sigpic

          Comment


          • #6
            Did you look at the Homeseer log when the high CPU usage is occuring? It would be interesting to see what HS was doing.

            Comment


            • #7
              Using the TIME+ is usually not relevant except in high frequency apps. I think you're not understanding that the process TIME+ is measured in "hundreths of seconds" not in seconds, minutes or hours.

              Comment


              • #8
                Seeing that time+ was so much above the real time . I was ssumong it was not a real time mesure . But i was able to com’re it to other mesure of my system.

                so, is this normal time + value now ? Thanks
                Attached Files

                Comment


                • #9
                  TIME is still not a valid metric for comparison of real CPU usage for HS3. HS3 is constantly doing something with evaluating status and events ALL THE TIME the process never sleeps. It's always active.

                  Look at spikes and correlate them to memory or disk (wait time). IF there's a high wait then look at your disk. If you're on a rPi the sd card is always going to be the bottleneck. For a high end system even disk is the bottleneck and yes even SSD will be the bottleneck compared to the CPU speed. Reduce logging. Spikes happen and are normal if they didn't happen the system wouldn't' be doing anything right? Watch for prolonged CPU usage not the little blips that happen. If there's a MAJOR blip then it's worth looking into. IF HS3 is really consuming 80-90-100% CPU... is that on 1 core? Or all Cores? I can sit and watch top on a machine or windows performance and see the cpu going all over the map... but there's no real problem.

                  Comment


                  • #10
                    Originally posted by Simplex Technology View Post
                    TIME is still not a valid metric for comparison of real CPU usage for HS3. HS3 is constantly doing something with evaluating status and events ALL THE TIME the process never sleeps. It's always active.

                    Look at spikes and correlate them to memory or disk (wait time). IF there's a high wait then look at your disk. If you're on a rPi the sd card is always going to be the bottleneck. For a high end system even disk is the bottleneck and yes even SSD will be the bottleneck compared to the CPU speed. Reduce logging. Spikes happen and are normal if they didn't happen the system wouldn't' be doing anything right? Watch for prolonged CPU usage not the little blips that happen. If there's a MAJOR blip then it's worth looking into. IF HS3 is really consuming 80-90-100% CPU... is that on 1 core? Or all Cores? I can sit and watch top on a machine or windows performance and see the cpu going all over the map... but there's no real problem.
                    thanks John

                    Comment


                    • #11
                      Originally posted by Rupp View Post
                      As long as it's not staying high does it matter? Opening Notepad pegs my CPU for a couple of seconds but it settles back down. Check your HS3 scripts as this is where most high CPU usage is derived.
                      That is probably the case.

                      Comment


                      • #12
                        Some other questions about time+ metric.


                        If I was using openhab as instense as hs3 , the cpu time would be as big ( somewhat) ?

                        The only process that goes over hs3 (in two hours from memory) is plex when transcoding.


                        My vague understanding of this metric was that : time+ = CPU utilization since boot. And the only thing i got was to compare it to other process....


                        Another case: I asked an author about is cpu time +, his plugin was using much time than the z wave one.

                        He saw a bug in is plugin (related to timers I think ). After the correction, the plugin was using much less time+. The plugin was in the one which used the least time+.


                        So the logic, that time+ is linked to cpu usage is there... but maybe I do not have all the theory to understand it all.
                        All I know is Homeseer is always doing something ( like you said John), and other process do not ( as much). Is it possible then, that hs3 is doing some things that it could do more efficiently, or maybe not doing them at all?

                        Comment


                        • #13
                          I do not have the time today. I need to prepare myself for a school appointment tomorrow. But will read more about the time+ metric in the next days John.

                          Comment


                          • #14
                            Any time a process is "active" doing something, anything, it ticks the "TIME" metric up. So if a process for instance does absolutely nothing but counts indefinitely that will increase the TIME+ metric. This is not necessarily CPU intensive as it's not really doing anything but increment a number but it is doing this constantly. This is almost exactly what HS3 does. HS3 evaluates events every single second constantly. This will cause the very high TIME metric.

                            Now depending on the complexity of the event and how many devices to check etc will determine the actual amount of CPU processing required during that evaluation. As different plugins do different things each will be somewhat different. Ones that evaluate things constantly will have a high TIME but may have low average CPU usage. Others that poll will show blips of CPU during the polling and heavy processing and then go back to sleep until the next polling cycle.

                            Prolonged CPU usage is a metric I watch for. Generally speaking a process will spike the CPU on startup and then during processing of things. If the CPU stays high for extended periods of time or for seemingly no reason then I start to question things.

                            Comparing against other systems and processes is tricky as you would have to know the inner workings of that process. Is it doing constant evaluations against something or is it sleeping most of the time?

                            Comment


                            • #15
                              Thanks again John! Things start to make sense now :P

                              Comment

                              Working...
                              X