dceejay / tfjs-coco-ssd

Node-RED node for tensorflowjs coco ssd
Apache License 2.0
14 stars 10 forks source link

Memory leak. When restarting flow memory is not released #13

Closed krambriw closed 3 years ago

krambriw commented 3 years ago

Memory leak. When restarting flow memory is not released

https://discourse.nodered.org/t/memory-leak-or-what-restarting-flow-with-tf-coco-ssd-node-increases-memory-consumption/52493

dceejay commented 3 years ago

Pushed v0.5.7 to explicitly clear model and font on close.

krambriw commented 3 years ago

Unfortunately, it did not help

I put 12 copies of the node on a flow (nothing else). After each flow restart, memory consumption increases with around 5% on a RPi4 w 4G. When memory consumption increases it takes longer and longer for the models to be loaded into all 12 nodes. When it reaches around 69%, it is not able to load all nodes with the models. After another flow restart, NR is no longer able to load the model into any of the 12 nodes. Node is now occupying 72% of the memory

On a RPi3 it has difficulties to load the models in all 12 nodes already from start, it takes long time, I think memory is not enough so continuing the test on a RPi3 is meaningless