Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage(with overheating) with 4 pingers enabled #346

Closed
hackruu opened this issue Apr 2, 2018 · 3 comments
Closed

High CPU usage(with overheating) with 4 pingers enabled #346

hackruu opened this issue Apr 2, 2018 · 3 comments

Comments

@hackruu
Copy link

hackruu commented Apr 2, 2018

Hello
Today i've set up pingIPAddress for my 4 bulbs and now i getting my CPU(intel i5 750) overheat. It even get 102C, which is way too much. When i disable pinger load average drops to nearly zero and CPU is fine. Any thoughts on reducing cpu usage? (increasing ping interval is least preferred way).
Also i mentioned in another issue on every ping i get log entries in syslog, i wonder if broadlink plugin tries to update accessory state in homebridge on every ping too...

also maybe use https://github.com/stephenwvickers/node-net-ping or any other library that provides ping instead of parallel forking for execing external binary?

@hackruu
Copy link
Author

hackruu commented Apr 2, 2018

i think you're running ping with -w2 parameter while pinging every 1s which makes no sense at all. probably this is not your fault, but library you're using. but that's not root of problem, it's just part of it. i think stop exec-forking will fix things.

@hackruu
Copy link
Author

hackruu commented Apr 2, 2018

okay, i figured out, here is what's going on:
because of -w2 while my FOUR accessories aren't online i got EIGHT ping processes consuming 100% cpu in kernelspace. sadly, this is the point. you must switch node library or use "timeout" variable for existing library.

i've wrote fping wrapper for ping for doing things faster, but it is a dirty hack.

@lprhodes
Copy link
Owner

lprhodes commented Jan 1, 2020

Hey, I've changed modules and added some performance tweaks in 3.6.11

@lprhodes lprhodes closed this as completed Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants