Announcement

Collapse
No announcement yet.

HS4 sluggish, high CPU usage, high disk writing

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

    HS4 sluggish, high CPU usage, high disk writing

    H,

    My system has got incredibly sluggish.

    HS4 4.2.12.0 (latest), running on i5 Windows 10 machine.

    CPU usage by HS4 is 30-55% or so. With consistently very high writing to disk (12-20MB/s) by HS4. See attached.

    Logs also contain heaps of entries for Energy DB, and the energy.hsd file is constantly updated, with a 50MB energy.hsd-journal file being written and then disappearing every few seconds.

    Typical copy of log contents attached.

    The 'Enable Logging and Graphing' checkbox is unchecked.

    I'm running out of things to try.

    I'd love to get rid of the energy logging - I don't use it, and it is just hogging resources. But there doesn't appear to be a way to do so.

    I'd welcome suggestions... At the moment my system is close to non-functional.

    Even with all Plugins disabled, it is the same. And I don't have any scripts (of which I am aware.... - I'm not a sophisticated user))

    Thanks in advance.

    #2
    Originally posted by Crumpy View Post
    H,

    My system has got incredibly sluggish.

    HS4 4.2.12.0 (latest), running on i5 Windows 10 machine.

    CPU usage by HS4 is 30-55% or so. With consistently very high writing to disk (12-20MB/s) by HS4. See attached.

    Logs also contain heaps of entries for Energy DB, and the energy.hsd file is constantly updated, with a 50MB energy.hsd-journal file being written and then disappearing every few seconds.

    Typical copy of log contents attached.

    The 'Enable Logging and Graphing' checkbox is unchecked.

    I'm running out of things to try.

    I'd love to get rid of the energy logging - I don't use it, and it is just hogging resources. But there doesn't appear to be a way to do so.

    I'd welcome suggestions... At the moment my system is close to non-functional.

    Even with all Plugins disabled, it is the same. And I don't have any scripts (of which I am aware.... - I'm not a sophisticated user))

    Thanks in advance.
    You can disable Energy Logging on the setup page. Uncheck the box "Enable logging and Graphing."

    Click image for larger version

Name:	hs4energy.jpg
Views:	382
Size:	42.1 KB
ID:	1545975

    Comment


      #3
      I have this problem, periodically, too. I can usually "fix things" [for a period of time] by rebooting the computer. Some users report this is caused by adding devices. I've tried to figure this out, too, but until HST sees this as a significant problem, I doubt we will have any substantive relief.
      HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
      Home Assistant 2024.3
      Operating System: Microsoft Windows 11 Pro - Desktop
      Z-Wave Devices via two Z-Net G3s
      Zigbee Devices via RaspBee on RPi 3b+
      WiFi Devices via Internal Router.

      Enabled Plug-Ins
      AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

      Comment


        #4
        You can also change the size of the Energy DB if you someday choose to log energy usage. It is on the same page that avpman references. I think the default is 50, changing it to 100 has helped others.

        Comment


          #5
          Thanks for your thoughts.

          Event logging is disabled, as per my original post.

          I have tried deleting the 'energy.hsd' file. It hasn't created a new one, the CPU usage has reduced somewhat (to 8-14% or so), and the excess disk writing has stopped. And it is a bit less sluggish, albeit not entirely happy.

          I deleted energy.hsd, as the repeat entries said it was slightly oversize and would be compacted. Except the amount it was oversize always remained the same, as per the log snapshot. So it didn't appear to actually be achieving anything.

          However, my log is now filling up with the following warning:
          Dropping event callbacks due to full queue (Type: STRING_CHANGE Device Ref: 2384) (2000 entries), system may be too busy, plugins and HSTouch may not receive all device updates

          with the reference to a device being to a variety of devices.

          So it appears it is still trying to write something, but is unable to do so.



          Comment


            #6
            What is Device Ref #2384?
            HS4Pro on a Raspberry Pi4
            54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
            Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

            HSTouch Clients: 1 Android

            Comment


              #7
              I had this problem when my log file hit the 50 MB limit I had set. I stopped HS4, renamed the HomeSeerLog.hsd file so the system could not find it, then restarted -- problem solved... I'm not clear what periodically flushes the log but something keeps it down to a manageable size -- maybe a backup? I dunno...

              Comment


                #8
                It appers that HS is raising events and there is a consumer that is not able to keep up with the events so the HS queue increases in size. Consumers are plugins and script callbacks. What do you have enabled for plugins and are you using any scripts that have registeter for the HSEvent callback?

                Comment


                  #9
                  Don't think device 2384 specifically is the issue. The same message was coming up with a variety of different devices.

                  No scripts running that I am aware of. Not sure how to write them.

                  How do I find out what plugins might be using HSEvent callback?

                  I dug up an old copy of Energy.hsd that was less than 50MB, and copied it into C:\Program Files (x86)\HomeSeer HS4\Data. Interestingly, it doesn't seem to be updating the file - file size and date modified are not changing.

                  No more Energy DB entries in the log, and the CPU usage is down around 10%, and no significant disk writing. No more event callback errors anymore either.

                  So CPU usage still higher than it used to be, but much better than it was. And much less sluggish.....

                  Comment


                    #10
                    Some have seen this when a plugin is continually updating a large number of device values. The utility here might help determine if this is the case. http://tenholder.net/tenWare2/tenHsEvents/default.aspx
                    tenholde

                    Comment


                      #11
                      Thanks - I'll have a look.

                      Comment


                        #12
                        How do I find out what plugins might be using HSEvent callback?
                        HS is the only place where the HSEvent is sourced so unless HST provides a utility to perfrom this analysis I do not thing you will get an answer. mcsMQTT plugn monitors CPU usage and other resources for each plugin and HS. JON00 has scripts that also provide resource monitoring. mcsMQTT debug outputs each HS event callback for DeviceValue, DeviceSet, String, and Log if setup to provided it.

                        I would look at CPU utilization at the plugin level first. You can get snapshots using Task Manager on Windows of Top/HTop on Linux. You can get the history of CPU use over time using mcsMQTT and History/Chart.

                        Comment

                        Working...
                        X