sjenkins Posted December 11, 2022 Posted December 11, 2022 First, I really love this node server, but I just did an HTOP on my Polisy and wow there seems to be something going on here in this node server that isn't right. Attached are two runs of HTOP with the YoLink Node server running and stopped ( I think you can figure out which is which). Anyone else having this issue?
Panda88 Posted December 12, 2022 Posted December 12, 2022 I'll take a look How many devices have you installed? Do you know if Memory increases over time?
sjenkins Posted December 12, 2022 Author Posted December 12, 2022 21 minutes ago, Panda88 said: I'll take a look How many devices have you installed? Do you know if Memory increases over time? 17 devices for 18 nodes total. don't think I'm seeing memory build over time as the Polisy is stable but it is slowing down the whole ISY.
Panda88 Posted December 12, 2022 Posted December 12, 2022 Each device is really a node server by itself - I'll see if there is something obvious wrong but it may take some time to get to the bottom of it
sjenkins Posted December 12, 2022 Author Posted December 12, 2022 2 minutes ago, Panda88 said: Each device is really a node server by itself - I'll see if there is something obvious wrong but it may take some time to get to the bottom of it Appreciate that. I am assuming you are not seeing this kind of cpu usage though?
Panda88 Posted December 12, 2022 Posted December 12, 2022 I did not study the CPU usage in great detail - I am in the progress of changing the message handling approach - It used to be every device was waiting for input from a queue - I am changing that to start a thread when a message arrives - I think that will lower the CPU usage I cannot think of anything else causing a lot of CPU usage - unless you are using the delay timers
GTench Posted December 12, 2022 Posted December 12, 2022 Does HTOP need to be installed? If so just wondering how. I would like to check my usage as well. thanks, Gary
sjenkins Posted December 12, 2022 Author Posted December 12, 2022 (edited) @GTench Can't remember if I installed it or it was there. sudo pkg update sudo pkg install htop (do NOT do a sudo pkg upgrade as that can cause issues with your Polisy system) Edited December 12, 2022 by sjenkins separate answers
sjenkins Posted December 12, 2022 Author Posted December 12, 2022 13 hours ago, Panda88 said: I did not study the CPU usage in great detail - I am in the progress of changing the message handling approach - It used to be every device was waiting for input from a queue - I am changing that to start a thread when a message arrives - I think that will lower the CPU usage I cannot think of anything else causing a lot of CPU usage - unless you are using the delay timers agree I have not looked at cpu usage much at all ; I pulled up HTOP as it seemed like my ISY was a bit laggy. Which is when I found this issue. I am not using the delay timers. Any thoughts on short poll long poll as a mitigation until you do your change to the message handling approach?
Panda88 Posted December 12, 2022 Posted December 12, 2022 top is installed - it shows the issue Trying to figure out what causes this 1
Panda88 Posted December 12, 2022 Posted December 12, 2022 Polls are not truly needed - MQTT updates when actions happen - short poll is mostly to send a heart beat there are cases where an update takes longer so the state has not changed when the display updates on the Admin Console - in this special case the poll causes the display to update - Not if using programs this does not matter 1
GTench Posted December 12, 2022 Posted December 12, 2022 Thanks... I used TOP. HTOP was not installed. Looks like I also see the high cpu usage. I am only using 3 message annoucement yolink devices currently
Panda88 Posted December 12, 2022 Posted December 12, 2022 I see the same issue - not sure what causes it (yet) My new release in testing does not see the issue, but I have far fewer devices on my test platform Polls are not truly needed - MQTT updates when actions happen - short poll is mostly to send a heartbeat there are cases where an update sometimes takes longer so the state has not changed when the display updates on the Admin Console - in this special case the poll causes the display to update - Not if using programs this does not matter
Panda88 Posted December 13, 2022 Posted December 13, 2022 (edited) Just a quick update - I checked my latest code and it does not show this behavior. I'll work towards releasing that - and maybe figure out what is causing the strange behavior - there must be an infinite loop somewhere but not easy to debug on the Polisy platform as I have no development tools there Edited December 13, 2022 by Panda88 2
Solution Panda88 Posted December 16, 2022 Solution Posted December 16, 2022 Just released version 0.7.0 - I believe it resolves the resource use
sjenkins Posted December 16, 2022 Author Posted December 16, 2022 Great, I’ll test as soon as the master UD computer digests & updates. Looks like it takes a few minutes (hours?)
Panda88 Posted December 16, 2022 Posted December 16, 2022 I think you can just refresh the store and it should show up
sjenkins Posted December 16, 2022 Author Posted December 16, 2022 yes you can (I forgot the button and was just refreshing the page, duh) anyway it would not do an automatic update...see image from the log. Didn't want to do a reinstall until I showed you.
sjenkins Posted December 16, 2022 Author Posted December 16, 2022 So just tried the (Re)Install button on the purchases page and it gave me a red box with.... "Can't find purchase option for licence record" ...not even sure what that means as its in my purchase list.
sjenkins Posted December 16, 2022 Author Posted December 16, 2022 ok, so the reinstall will work from the store page but not from the purchase page ; not sure if that is particular to your NS or a PG3 issue. The auto update with a node reset would not work even after I did a PG3 reset (did NOT try a full POLISY reboot) anyway the YoLink NS is back up and running doing a re-install and I did check HTOP ; all is well. I will mark as solved and leave these other issues as they were not part of the high CPU usage issue. Thanks so much @Panda88!!
bpwwer Posted December 16, 2022 Posted December 16, 2022 15 hours ago, sjenkins said: ok, so the reinstall will work from the store page but not from the purchase page ; not sure if that is particular to your NS or a PG3 issue. The auto update with a node reset would not work even after I did a PG3 reset (did NOT try a full POLISY reboot) anyway the YoLink NS is back up and running doing a re-install and I did check HTOP ; all is well. I will mark as solved and leave these other issues as they were not part of the high CPU usage issue. Thanks so much @Panda88!! Are you PG3 3.1.16 or something a little older? Starting with 3.1.16, the re-install from the purchase page and the store should work exactly the same. Prior versions would fail from the purchase page if it didn't know which purchase option you had originally made. When the ability to support multiple versions of a node server was introduced, it made it difficult for PG3 to determine which version had been installed previously. The result is that things like auto-update can't always figure out what version should be used to update. When you do a re-install, you have to manually select which version to install so there's no guesswork on PG3's part. In your case, it looks like the auto update failed because something was modified in the node server directory that cause the deploy method to fail. That's probably a node server issue if it is modifying files that shouldn't be modified.
sjenkins Posted December 17, 2022 Author Posted December 17, 2022 19 hours ago, bpwwer said: Are you PG3 3.1.16 or something a little older? Starting with 3.1.16, the re-install from the purchase page and the store should work exactly the same. Prior versions would fail from the purchase page if it didn't know which purchase option you had originally made. When the ability to support multiple versions of a node server was introduced, it made it difficult for PG3 to determine which version had been installed previously. The result is that things like auto-update can't always figure out what version should be used to update. When you do a re-install, you have to manually select which version to install so there's no guesswork on PG3's part. In your case, it looks like the auto update failed because something was modified in the node server directory that cause the deploy method to fail. That's probably a node server issue if it is modifying files that shouldn't be modified. @bpwwer I'm on 3.1.15 with ISY 5.4.5 as well. Have been holding a couple days on my POLISY update until the firmware stabilised with the new board. So sounds like from your description that will be the issue, appreciate the explanation. I will likely hit the button today once I get read up on the current Matter board procedure.
bpwwer Posted December 17, 2022 Posted December 17, 2022 @sjenkinsYou should be able to do re-installs via the node server store, select the node server, select install for the purchase option and then you have the option to re-install to the same slot it is currently installed in. From the purchases page, it tries to guess what you would select in the last step above and will fail a lot of time. 3.1.16 changes the re-install on the purchases page to follow the same steps as the process from the node server store. 1
Recommended Posts