Closed saurabhsharma001 closed 6 years ago
More samples:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
287 root 20 0 35084 31252 6472 R 44.6 3.3 6:12.50 amazon-dash
435 homeass+ 20 0 472424 88752 16528 S 11.5 9.3 2:41.15 hass
2025 pi 20 0 8044 3220 2712 R 1.0 0.3 0:01.40 top
886 pi 20 0 11576 3704 2992 S 0.7 0.4 0:00.95 sshd
299 avahi 20 0 6436 3116 2764 S 0.3 0.3 0:00.77 avahi-daemon
A CPU usage of 10% in a raspberry pi is a reasonable usage. Amazon-dash sniffs your network traffic. I have improved the filtering rules but there is not much more that can be improved.
A raspberry pi has a very limited hardware and amazon-dash will use more cpu if you have a lot of traffic in your network.
I can not improve CPU consumption any more without more help.
Couldn't we write the sniffer in C++ and reduce the CPU drain dramatically? For example with this lib: http://libtins.github.io/ if its possible I may invest some time.
Put an
x
into all the boxes [ ] relevant to your issue (like this:[x]
)What is the purpose of your issue?
Guideline for bug reports
You can delete this section if your report is not a bug
How to get your version: pip install
pip install
orsetup install
command has been completed without errorspython -m amazon_dash.install
command has been completed without errorsamazon-dash discovery
command works without errorsamazon-dash --debug run
worksDescription
Upgraded to the latest version of Amazon Dash 1.2.0. The CPU usage is little less than previous version but still it hovers around 40-50%. I am using latest Raspbian on Raspberry Pi 3B+. The same raspberry is also running HomeAssistant.
What I Did
Upgrade from 1.1.1 to 1.2.0. The CPU usage came down about 10%.