node-red-node-pi-gpio -> nrgpio.py uses ~1% CPU per IO port
pebl-hank opened this issue · 2 comments
Node-red: 3.1.8
node-red-node-pi-gpio: 2.0.6
Nodejs: 20.12.1
Raspberry Pi 5 (64bit)
My flow uses multiple "rpi-gpio in" nodes to monitor if an IO port is 0 or 1. Debouncing is set to 100mS (changing this value seems not to solve the issue).
The issue is that htop shows 4 "nrgpio.py" process per IO line that is configured in the node-red flow. That are about 40 processes. 1 of each 4 processes continously has a CPU usage of about 0.7 up to 2%. So 10 processes use around 1% each on average.
I did not notice that issue on my Raspberry Pi 4 that ran a 32bit OS.
Is that something that can be fixed in this module?
Example:
[ { "id": "a95c2f4d.c0168", "type": "rpi-gpio in", "z": "bb3e7715.2c09", "name": "bad", "pin": "26", "intype": "down", "debounce": "100", "read": true, "bcm": true, "x": 90, "y": 700, "wires": [ [ "b860d764.0aea98", "a65e9d62ead68e73" ] ] }, { "id": "728b682e.a4b2c", "type": "rpi-gpio in", "z": "bb3e7715.2c09", "name": "wohn", "pin": "16", "intype": "down", "debounce": "100", "read": true, "bcm": true, "x": 90, "y": 640, "wires": [ [ "9b4d24c4.8bd2f", "a65e9d62ead68e73" ] ] }, { "id": "17b463b.93fcc1c", "type": "rpi-gpio in", "z": "bb3e7715.2c09", "name": "schlaf", "pin": "21", "intype": "down", "debounce": "100", "read": true, "bcm": true, "x": 90, "y": 520, "wires": [ [ "c8aba6f6.5eb048", "a65e9d62ead68e73" ] ] }, { "id": "a65e9d62ead68e73", "type": "debug", "z": "bb3e7715.2c09", "name": "debug 51", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 420, "y": 640, "wires": [] } ]