Jump to content

YoLink Node server taking 10X resources of other node servers


sjenkins
Go to solution Solved by Panda88,

Recommended Posts

Posted

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?

 

Screenshot 2022-12-11 at 5.34.56 PM.png

Screenshot 2022-12-11 at 5.34.00 PM.png

Posted
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. 

 

Posted
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?

Posted

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 

Posted

Does HTOP need to be installed? If so just wondering how. I would like to check my usage as well.

thanks,

Gary

Posted (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 by sjenkins
separate answers
Posted
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?

 

Posted

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 

  • Like 1
Posted

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

image.thumb.png.0b7a96a0455b2a4d1a0f513964259bdf.png

Posted

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 

 

Posted (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 by Panda88
  • Like 2
Posted

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.

 

image.thumb.png.ab5a9c64ff7223e187295aadc2c3b0dd.png

Posted

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.

Posted

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!! 

Posted
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.

Posted
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. 

Posted

@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.

  • Thanks 1
Guest
This topic is now closed to further replies.

×
×
  • Create New...