Announcement

Collapse
No announcement yet.

Works...but takes too much CPU resources

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

  • Works...but takes too much CPU resources

    Latest version of MyQ does work for me after few rollercoaster months. However it takes up to 26% of CPU resources bringing the whole HS3 computer to a halt (100% cpu).
    For comparison HS3 by itself uses 66% of the CPU and the next most demanding plug-in is Big5 that uses only 0.3% CPU Click image for larger version

Name:	1AB688A0-DC9D-4C8A-BE97-BE52ADB81755.jpeg
Views:	222
Size:	67.2 KB
ID:	1353814 the next most demanding plug-in is Big5 that takes only 0.3% CPU.

  • #2
    I’m not seeing that here. I have mine polling at 10 seconds (10000 ms) and at polling it uses ~7%, otherwise it is at 0. I only see HS at 15-17% so our systems use much different amounts of resources.
    Randy Prade
    Aurora, CO
    Prades.net

    PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

    Comment


    • #3
      I too am not seeing high CPU. I'll run it through the Visual Studio performance profiler for a couple days and see if anything is taking unnecessary CPU cycles.

      Comment


      • #4
        Originally posted by rprade View Post
        I’m not seeing that here. I have mine polling at 10 seconds (10000 ms) and at polling it uses ~7%, otherwise it is at 0. I only see HS at 15-17% so our systems use much different amounts of resources.
        Your numbers confirm my observations that MyQ peaks at about 1/2 to 1/3 of the cpu usage of hs3. Unlike me you are not anywhere close to 100% cpu utilization so that you shouldn’t be concerned. In my case however MyQ is pushing the envelope.

        Comment


        • #5
          I have always had 25% continuously.
          at the very beginning of the start it starts with a few percent but very quickly after several minutes we come to 25% constant

          Comment


          • #6
            A new version is being released today (1.2020.0226.875). I've done extensive CPU utilization studies on this version and introduced performance improvements in many areas. The new version should show only small spikes in CPU usage according to your polling interval. So if you run an under-powered PC and need to reduce the load, try spacing out the the polling interval setting. The default value is 10 seconds or 10,000 milliseconds.


            Here's a graph from the performance profiling tools in visual studio. The tool samples the CPU utilization at a rate of 1000 samples per second. The spikes below directly correlate to the polling interval setting.

            Plugin CPU Usage

            Comment


            • #7
              Thanks. Appreciate the work.

              Comment


              • #8
                Thanks for the update! Average CPU usage whent from 35.6% down to 20.1%

                Comment


                • #9
                  I'm seeing a moderate decrease as well. It was bouncing from ~2% to 12% every 4+/- seconds. Now it bounces between
                  ~0.5% (sometimes 0%) and 11%.

                  It's not clear why it bounces so frequently. I have polling set to 10000ms so I would expect the spike every 10 seconds.
                  -Wade

                  Comment


                  • #10
                    Originally posted by cc4005 View Post
                    I'm seeing a moderate decrease as well. It was bouncing from ~2% to 12% every 4+/- seconds. Now it bounces between
                    ~0.5% (sometimes 0%) and 11%.

                    It's not clear why it bounces so frequently. I have polling set to 10000ms so I would expect the spike every 10 seconds.
                    Not sure why it's bouncing so frequently either. The plugin literally does nothing in between the poll cycles. If you set the poll cycles to 30 seconds does the bouncing change or maintain the 4sec spikes? Check and make sure you don't have the log level set to trace or debug

                    Also, what OS are you running? I've got 3 test systems I'm testing it on and non of them exhibit the behavior you describe.

                    Comment


                    • #11
                      If running windows, don't use the task manager to get process performance. Click Start and search for Performance Monitor. Open that and click the "Performance Monitor" section under monitoring tools Then click the Green + and got o the process section, and select "% Privileged Time". On the bottom windows where it lists all the processes, select the HSPI_MyQ process and click the add button. This will graph the actual CPU usage of the process on the system.

                      Comment


                      • #12
                        Originally posted by kingfetty View Post

                        Not sure why it's bouncing so frequently either. The plugin literally does nothing in between the poll cycles. If you set the poll cycles to 30 seconds does the bouncing change or maintain the 4sec spikes? Check and make sure you don't have the log level set to trace or debug

                        Also, what OS are you running? I've got 3 test systems I'm testing it on and non of them exhibit the behavior you describe.
                        My HS3 server is on Win10 Pro v1909 x64. Log level is set to warn. Here's a comparison of polling set to 10s and 30s. At least the CPU% appears much lower using performance monitor than task manager was showing (priveleged time vs total maybe?).

                        10 second polling - spike every ~4s typical with a couple intervals ~9s
                        Click image for larger version  Name:	Capture.PNG Views:	0 Size:	13.2 KB ID:	1366689

                        30 second polling - spike every ~11.5s
                        Click image for larger version  Name:	Capture1.PNG Views:	0 Size:	12.5 KB ID:	1366690

                        I don't think this is a big problem, but welcome your investigation if it may point to something odd going on with the PI.
                        -Wade

                        Comment

                        Working...
                        X