high cpu when dzvents is enabled
Moderator: leecollings
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
high cpu when dzvents is enabled
Version: 4.9700
Platform: rpi
Plugin/Hardware: dzvents
I'm running 4.9700 (stable) on rpi2 but when I have dzvents enabled if have high cpu load.
It's adding about 50% cpu load to the averige, when I disable dzvents the cpu usage drops immediately.
I've added a screen shot where you can see in the yellow square when I've enabled dzvents and temp disabled it.
I'm running 3 simple scripts which when I open a door a turn on the lights or send me a message.
I like dzvents, but the cpu usage is to high it's slowing down my system.
anyone an idea how to fix this issue?
Platform: rpi
Plugin/Hardware: dzvents
I'm running 4.9700 (stable) on rpi2 but when I have dzvents enabled if have high cpu load.
It's adding about 50% cpu load to the averige, when I disable dzvents the cpu usage drops immediately.
I've added a screen shot where you can see in the yellow square when I've enabled dzvents and temp disabled it.
I'm running 3 simple scripts which when I open a door a turn on the lights or send me a message.
I like dzvents, but the cpu usage is to high it's slowing down my system.
anyone an idea how to fix this issue?
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: high cpu when dzvents is enabled
Do you have any script defined? If so, can you remove them all or disabled them if you created them in using the built-in editor? Also make sure you don't have dzVents running in debug mode (setting in the GUI).
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
logging is set to "error + minimal execution"
I had three script running and have disabled them now.
cpu usage is now back to +- 12%, I'll add a screenshot tomorrow.
scripts:
- Spoiler: show
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
annegerben wrote: ↑Monday 06 August 2018 22:06logging is set to "error + minimal execution"
I had three script running and have disabled them now.
cpu usage is now back to +- 12%, I'll add a screenshot tomorrow.
scripts:
- Spoiler: show
todays graph
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: high cpu when dzvents is enabled
Can you please reactivate the scripts and set the loglevel for domoticz one level higher (= add generic info) and look at the log to see if you find anything unusual in there.
(as example: scripts or device-adapters that are triggered very often or dzVents errors)
This might help finding the root cause.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
when I enable on of the scripts cpu load directly high again.waaren wrote: ↑Tuesday 07 August 2018 9:29Can you please reactivate the scripts and set the loglevel for domoticz one level higher (= add generic info) and look at the log to see if you find anything unusual in there.
(as example: scripts or device-adapters that are triggered very often or dzVents errors)
This might help finding the root cause.
I've updated one of the scripts to report on a dummy switch, but no errors in the logs:
Code: Select all
2018-08-07 10:09:01.993 Status: EventSystem: Script event triggered: SolarInverter
2018-08-07 10:09:39.045 Status: User: AG initiated a switch command (563/TAG-Bezoek/On)
2018-08-07 10:09:40.051 Status: dzVents: Info: Handling events for: "TAG-Bezoek", value: "On"
2018-08-07 10:09:40.052 Status: dzVents: Info: ------ Start internal script: deurgeopend: Device: "TAG-Bezoek (TAG)", Index: 563
2018-08-07 10:09:40.052 Status: dzVents: Info: ------ Finished deurgeopend
2018-08-07 10:09:40.673 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-08-07 10:09:40.703 Status: Notification: TAG-Bezoek On
2018-08-07 10:10:12.677 Status: EventSystem: Script event triggered: SolarInverter
- Spoiler: show
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: high cpu when dzvents is enabled
How many active devices do you have in your Domoticz instance?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: high cpu when dzvents is enabled
Ok, that's not excessive. So, you can enable debug logging in dzVents. Then, whenever dzVents gets triggered due to an event, you should see something in Domoticz log. Apart from the events you defined in your on-sections in your three scripts, do you see more events in the log? Note that debug logging can create quite a lot of entries in the log and you may have to inspect the logging using the command-line (start domoticz exec manually from the CLI and watch the out (same as the log)). Maybe there is another device that is generating an enormous amount of events.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
I don't see anything strange in the log (see attached).
- I've restarted the domoticz at about 14:29
- enabled 1 dzvents script at 15.01
- trigger a switch starting at 15.06
but with debug running the CPU is near 100%
- I've restarted the domoticz at about 14:29
- enabled 1 dzvents script at 15.01
- trigger a switch starting at 15.06
but with debug running the CPU is near 100%
- Attachments
-
- domoticz.7z
- (34.73 KiB) Downloaded 52 times
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: high cpu when dzvents is enabled
Don't see anything weird.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
When I disabled Zwave the cpu usage goes back to normal.
This is not a solution of course ..
other thought: is a rpi 2b sufficient for dzvents?, what is the cpu load on a 3b+
This is not a solution of course ..

other thought: is a rpi 2b sufficient for dzvents?, what is the cpu load on a 3b+
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: high cpu when dzvents is enabled
My cpu load is 0.2% 
But, I don't use any of the internal scripting and I run on a Intel NUC

But, I don't use any of the internal scripting and I run on a Intel NUC

-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
Yes, but since I use a NUC (more then 3 years ago now) I never had memory, cpu or disk problems anymore. And when compiling from source, it's way faster then a RPi. For me it was the best investment ever.annegerben wrote: ↑Wednesday 08 August 2018 13:20hahaha, sounds like an overkill![]()
an intel nuc is a bit more expensive then a rpi
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: high cpu when dzvents is enabled
Might be overkill but you can run a virtualisation platform like EXSI or Proxmox on it and run multiple servers on 1 NUC.
That instantly gives also a great way to make complete system backups. Even if my NUC goes completely down I'm back up and running in one hour.
That instantly gives also a great way to make complete system backups. Even if my NUC goes completely down I'm back up and running in one hour.
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
comparing a € 300 nuc to a € 40 pi isn't really fair.Egregius wrote: ↑Wednesday 08 August 2018 14:15 Might be overkill but you can run a virtualisation platform like EXSI or Proxmox on it and run multiple servers on 1 NUC.
That instantly gives also a great way to make complete system backups. Even if my NUC goes completely down I'm back up and running in one hour.
I understand that the nuc is a nice and powerfull device and I also have a synology DS218+ which could run domoticz.
But I like to run domoticz on a dedicated device so I can keep the down time to a minimum and take the other devices offline when I want or need.
Also no down time (running it on a dedicated device) keeps the WAF high

So if spending €40 on a RPI 3b+ will solve my problem that would be acceptable.
But a solution for my current setup would be even better.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: high cpu when dzvents is enabled
Well, the RPi 3B is lot's faster than the RPi2. No doubt about that. I have RPi2, 3 and 3B in the house and the speed difference is quite noticable.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: high cpu when dzvents is enabled
Just wondering could it be that the zwave sconfig is set to update the sensors and devices very frequent ? dzVents loads the device-adapters on every update so with many zwave devices and frequent zwave updates this might have impact.annegerben wrote: ↑Wednesday 08 August 2018 11:41 When I disabled Zwave the cpu usage goes back to normal.
This is not a solution of course ..![]()
other thought: is a rpi 2b sufficient for dzvents?, what is the cpu load on a 3b+
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 26
- Joined: Wednesday 03 August 2016 12:34
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: high cpu when dzvents is enabled
Received a new rpi3b+ yesterday.
cpu load without dzvents is about 1%
cpu load without dzvents is about 5%
so quite a difference
cpu load without dzvents is about 1%
cpu load without dzvents is about 5%
so quite a difference
Who is online
Users browsing this forum: No registered users and 1 guest