Closed etatus closed 6 years ago
Hello. Amazon-dash listens to your network traffic. If you have a lot of traffic Amazon-dash consumes more CPU. Also a raspberry pi has few resources.
Duplicated issue: https://github.com/Nekmo/amazon-dash/issues/40
The thing is that there is another project (specifically oriented to Home Assistant), dasshio, that also listents to the network traffic, but CPU usage is less than 1%. Maybe you can have a look to take some ideas to optimize your great tool, the code is quite simple.
@etatus dasshio also uses scapy, but It uses more filters on sniff function
https://github.com/danimtb/dasshio/blob/master/dasshio/dasshio.py#L146
Maybe this will improve the performance but could cause issues in certain situations. I am going to investigate this. Thank you.
Ok, It works. Thank you.
How can I try the modified version? Is the version 2.0 ready to download? When do you expect to release it?
@etatus This change will be released in release 1.2.0. You can try this version using:
pip install git+https://github.com/Nekmo/amazon-dash.git@develop#egg=amazon-dash
http://docs.nekmo.org/amazon-dash/installation.html
Version 1.2.0 will be released in the coming weeks. There are still several months left for release 2.0.
Amazon-dash 2.0 is a major release and has many changes (+20 execution methods and more). It is still in development.
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
amazon-dash version: 1.1.1
Python version: 2.7.9
Pip & Setuptools version: 18.0
Operating System: Raspbian (Linux version 4.9.35-v7+)
[X] The
pip install
orsetup install
command has been completed without errors[X] The
python -m amazon_dash.install
command has been completed without errors[X] The
amazon-dash discovery
command works without errors[X] I have created/edited the configuration file
[X] Amazon-dash service or
amazon-dash --debug run
worksDescription
It seems amazon-dash service consumes a relevant share of CPU (around 15% average) in stand by. I think this is too much for a service like this, especially if you are using a Raspberry Pi as a server. In the same Raspberry Pi, other services like lighttpd, plexmediaserver, transmission and home assistant do not consume more than 2% in stand by.
What I Did
I ran 'top' and 'htop' for a while and observed the results (sorted by cpu usage).