Is dzVents that heavy on the CPU?

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
quiptix
Posts: 3
Joined: Thursday 20 September 2018 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Is dzVents that heavy on the CPU?

Post by quiptix »

Hi,

Maybe this is already discussed however since temperature is a common word in Domoticz-world, so I will (re)try again:
When I started with a LUA and soon converted it to a dzVents timer event the load on the CPU and temperaure of the CPU significantly raised from 45 celsius to 58 celsius and the CPU went from 4% to 15%.

One event runs every 5 minutes and one event runs every 24 hours on a specific time. Is this a common raise of used resources with LUA and/or dzVents?

It runs on a RPI 3B+

Any thoughts on this?

Thanks
Vincent
Naamloos.jpg
Naamloos.jpg (8.1 KiB) Viewed 886 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Is dzVents that heavy on the CPU?

Post by waaren »

quiptix wrote: Sunday 27 January 2019 17:33 When I started with a LUA and soon converted it to a dzVents timer event the load on the CPU and temperature of the CPU significantly raised from 45 celsius to 58 celsius and the CPU went from 4% to 15%.
One event runs every 5 minutes and one event runs every 24 hours on a specific time. Is this a common raise of used resources with LUA and/or dzVents?
It runs on a RPI 3B+
any thoughts on this?
The percentage rise of CPU% is about the same as I measure when I activate dzVents on top of the event system on domoticz V4.10364. There is certainly some overhead in using dzVents compared to Lua if you use only a few scripts. The good thing is that the rise in CPU% is not lineair to the amount of scripts in use.
I have about 60 dzVents scripts active in a mix of device, timers, uservariables and httpResponses types on a RPI3 (debian stretch) with about half of them with debug logging continuously switched on and my measured CPU usage is about the same as what you see with two scripts. What can cause quite a heavy load on your system is a script with a syntax error in it, DzVents will then flood the domoticz log with messages.
Hope this clarifies
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
quiptix
Posts: 3
Joined: Thursday 20 September 2018 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Is dzVents that heavy on the CPU?

Post by quiptix »

It clarifies some. Is there a difference between device triggered scripts or timer triggered scripts?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Is dzVents that heavy on the CPU?

Post by waaren »

quiptix wrote: Tuesday 29 January 2019 1:32 It clarifies some. Is there a difference between device triggered scripts or timer triggered scripts?
dzVents uses a different mechanism than domoticz Lua for this. The scripts can be a combination of device triggered and time triggered (and other triggers).
Time triggered can be every minute but also once a year and more or less the same can be true for devices and variable triggered scripts. My P1 device triggers a script every 10 seconds and I also use a script triggered by a uservariable that I only use once a month at most.
The evaluation of these triggers takes some cycles but not many and even less in the latest Beta (V4.10365) due to an improved algorithm for scanning the directory's.
As always YMMV.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
quiptix
Posts: 3
Joined: Thursday 20 September 2018 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Is dzVents that heavy on the CPU?

Post by quiptix »

Thanks. As I like to keep it stable I will wait for the next stable release and try again.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest