Currently my project uses consistent memory usage so I'm only posting this if someone more knowledgeable than I wants to investigate.
Below is a simple flow to demonstrate what I saw. I used the command top
to monitor the memory usage. I deployed the flow and monitored the memory usage for 10 minute and saw no detectable change.
acdeb.1ffe2","order":0,"width":0,"height":0,"passthru":false,"label":"startt","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":420,"y":340,"wires":[["b7c167e8.8aa288"]]},{"id":"bdd7e6a2.b6f478","type":"link out","z":"5e307ddf.4c223c","name":"","links":["94443021.dfb518"],"x":775,"y":340,"wires":[]},{"id":"d0f07a4.3b72288","type":"function","z":"5e307ddf.4c223c","name":"","func":"var count = flow.get(\"count\") || 0\nvar run = flow.get(\"run\")\n\nif (run === true)\n{\n count = count +1 \n flow.set(\"count\",count)\n msg.payload = count\n msg.junk=\"just some extra data to speed things along\"\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":500,"wires":[["3bb2968b.c312b2","1480c6bd.683719","8cebb462.28e97"]]},{"id":"94443021.dfb518","type":"link in","z":"5e307ddf.4c223c","name":"","links":["bdd7e6a2.b6f478","c0555641.431d1","c37ef653.4372c8"],"x":375,"y":500,"wires":[["d0f07a4.3b72288"]]},{"id":"3bb2968b.c312b2","type":"ui_numeric","z":"5e307ddf.4c223c","name":"","label":"numeric","tooltip":"","group":"851acdeb.1ffe2","order":1,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":10,"step":1,"x":860,"y":500,"wires":[[]]},{"id":"ab9236a2.3cb588","type":"delay","z":"5e307ddf.4c223c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":990,"y":600,"wires":[["c0555641.431d1"]]},{"id":"c0555641.431d1","type":"link out","z":"5e307ddf.4c223c","name":"","links":["94443021.dfb518"],"x":1145,"y":600,"wires":[]},{"id":"b7c167e8.8aa288","type":"function","z":"5e307ddf.4c223c","name":"","func":"flow.set (\"run\", true)\nmsg.payload = true\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":340,"wires":[["bdd7e6a2.b6f478"]]},{"id":"345586f3.a2ceaa","type":"ui_button","z":"5e307ddf.4c223c","name":"","group":"851acdeb.1ffe2","order":0,"width":0,"height":0,"passthru":false,"label":"stop","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":430,"y":400,"wires":[["8b58bce9.b9426"]]},{"id":"8b58bce9.b9426","type":"function","z":"5e307ddf.4c223c","name":"","func":"flow.set (\"run\", false)\nmsg.payload = false\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":400,"wires":[["c37ef653.4372c8"]]},{"id":"c37ef653.4372c8","type":"link out","z":"5e307ddf.4c223c","name":"","links":["94443021.dfb518"],"x":795,"y":400,"wires":[]},{"id":"1480c6bd.683719","type":"function","z":"5e307ddf.4c223c","name":"","func":"\n\nif ( msg.payload%2 === 0)\n{\n \n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":600,"wires":[["ab9236a2.3cb588"]]},{"id":"8cebb462.28e97","type":"function","z":"5e307ddf.4c223c","name":"","func":"\n\nif (msg.payload%2 !=0)\n{\n \n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":680,"wires":[["7b898fe1.d784c"]]},{"id":"7b898fe1.d784c","type":"delay","z":"5e307ddf.4c223c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1010,"y":680,"wires":[["c0555641.431d1"]]},{"id":"851acdeb.1ffe2","type":"ui_group","name":"Default","tab":"dac282b7.6b7eb","order":1,"disp":true,"width":"6","collapse":false},{"id":"dac282b7.6b7eb","type":"ui_tab","name":"flow1","icon":"dashboard","disabled":false,"hidden":false}]
Then I hit the start button to start the flow processing and again monitored the memory usage for 10 minutes and saw an increase of ~ 7 MB.
Next I replaced the link in/out nodes with wires. The flow is below:
[{"id":"5e307ddf.4c223c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"b82eabaa.14f768","type":"ui_button","z":"5e307ddf.4c223c","name":"","group":"851acdeb.1ffe2","order":0,"width":0,"height":0,"passthru":false,"label":"startt","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":420,"y":340,"wires":[["b7c167e8.8aa288"]]},{"id":"d0f07a4.3b72288","type":"function","z":"5e307ddf.4c223c","name":"","func":"var count = flow.get(\"count\") || 0\nvar run = flow.get(\"run\")\n\nif (run === true)\n{\n count = count +1 \n flow.set(\"count\",count)\n msg.payload = count\n msg.junk=\"just some extra data to speed things along\"\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":500,"wires":[["3bb2968b.c312b2","1480c6bd.683719","8cebb462.28e97"]]},{"id":"3bb2968b.c312b2","type":"ui_numeric","z":"5e307ddf.4c223c","name":"","label":"numeric","tooltip":"","group":"851acdeb.1ffe2","order":1,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"topic","topicType":"msg","format":"{{value}}","min":0,"max":10,"step":1,"x":860,"y":500,"wires":[[]]},{"id":"ab9236a2.3cb588","type":"delay","z":"5e307ddf.4c223c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":990,"y":600,"wires":[["d0f07a4.3b72288"]]},{"id":"b7c167e8.8aa288","type":"function","z":"5e307ddf.4c223c","name":"","func":"flow.set (\"run\", true)\nmsg.payload = true\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":340,"wires":[["d0f07a4.3b72288"]]},{"id":"345586f3.a2ceaa","type":"ui_button","z":"5e307ddf.4c223c","name":"","group":"851acdeb.1ffe2","order":0,"width":0,"height":0,"passthru":false,"label":"stop","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":430,"y":400,"wires":[["8b58bce9.b9426"]]},{"id":"8b58bce9.b9426","type":"function","z":"5e307ddf.4c223c","name":"","func":"flow.set (\"run\", false)\nmsg.payload = false\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":400,"wires":[["d0f07a4.3b72288"]]},{"id":"1480c6bd.683719","type":"function","z":"5e307ddf.4c223c","name":"","func":"\n\nif ( msg.payload%2 === 0)\n{\n \n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":600,"wires":[["ab9236a2.3cb588"]]},{"id":"8cebb462.28e97","type":"function","z":"5e307ddf.4c223c","name":"","func":"\n\nif (msg.payload%2 !=0)\n{\n \n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":680,"wires":[["7b898fe1.d784c"]]},{"id":"7b898fe1.d784c","type":"delay","z":"5e307ddf.4c223c","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1010,"y":680,"wires":[["d0f07a4.3b72288"]]},{"id":"851acdeb.1ffe2","type":"ui_group","name":"Default","tab":"dac282b7.6b7eb","order":1,"disp":true,"width":"6","collapse":false},{"id":"dac282b7.6b7eb","type":"ui_tab","name":"flow1","icon":"dashboard","disabled":false,"hidden":false}]
I again started the flow and monitored the memory usage for 10 minutes and did not see an increase in memory usage.