abanchev / binance-proxy

64 stars 21 forks source link

Resource Usage #2

Open s0undt3ch opened 3 years ago

s0undt3ch commented 3 years ago

Is this kind of resource usage expected?

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                      
 156297 root      20   0   10.9g 627964  21664 S  47.2  30.9   3:01.58 node .                                                                                                                           
 156655 root      20   0  837012 386568  36340 S  19.9  19.0   1:14.82 /root/freqtrade/.env/bin/python3.9 /root/freqtrade/.env/bin/freqtrade trade --sd-notify --user-data /root/.config/freqtrade/live-binance-bu+ 
 156682 root      20   0  837432 387408  36380 S  15.9  19.0   0:57.58 /root/freqtrade/.env/bin/python3.9 /root/freqtrade/.env/bin/freqtrade trade --sd-notify --user-data /root/.config/freqtrade/live-binance -c+ 
 152114 root      20   0  975528  30972  10132 S   0.3   1.5   0:02.37 /usr/bin/containerd
abanchev commented 3 years ago

Depends on the machine that it is running on, as well as on the amount of coins, for reference here is how a two core vultr server looks when there is no active candle calculation by FT

Screen Shot 2021-08-15 at 23 51 02

In general every 2 seconds each websocket receives an update, transforms some data (very rudimentary) and updates an array, nothing that should take a ton of processing. Anyway i will take a look if i can speed up a specific part of the array update, this may yield better performance without any sacrifices.

abanchev commented 3 years ago

the latest commit should be using less CPU, you can test it