silicoin-network / silicoin-blockchain

Silicoin blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
79 stars 28 forks source link

Really high resource usage on low powered harvesters (e.g. Raspberry) and long time needed to recognize plots #137

Closed PrEzi3 closed 2 years ago

PrEzi3 commented 2 years ago

Since a few versions (I believe it all started more or less around when Chia version 1.2.10 codebase was introduced and staking was introduced into SIT) I have noticed extremely high resource usage (CPU time) when harvesting on low power devices (e.g. RaspberryPi). Please note --- this has not been the case a few versions back. Also extremely slow adding new plots and starting up (from starting harvester up to fully caching up all plots). In Chia it was nearly fully fixed with the codebase 1.2.11.

Steps to replicate : on Raspberry Pi set up SIT, add a lot of plots at once. Compared to old versions it takes forever for them to be cached. Also running SIT harvester on Raspberry uses extreme amount of resources (twice-triple the amount it used before in "old" versions).

Please note --- this is not a configuration issue of the Raspberry as I have three of them running and also testing other forks which introduced a similar behavior when incorporating chia 1.2.9-10 codebase commits. Flax has more or less fixed it updating from 0.1.4 to 0.1.5 (chia 1.2.11).

Can you please take a look at the commits introduced with chia 1.2.11 and incorporate them into the SIT codebase? Thank you!

albertcoady commented 2 years ago

Thank you, we will take a look at Chia 1.2.11

PrEzi3 commented 2 years ago

Any news @albertcoady Even with SIT 1.1.3 the harvesting and plot loading is extremely resource-heavy and slow.

albertcoady commented 2 years ago

The new version which merge Chia 1.2.11 is under testing.

jfikar commented 2 years ago

I can confirm SIT 1.1.3 has abnormally high CPU usage. I'm running 15 forks and today I compared CPU Time of all the running processes (you can do htop and press F6 > TIME, or ps aux | grep -E "node|harvester" | sort -n -k 10) . The highest was sit_full_node with 3 hours followed by chia_full_node with 2 hours. But of course the chia blockchain is much larger and more busy.

Surprisingly, sit_harvester has also very high CPU usage, it shows 1hour 38 minutes! Other harvesters have much lower CPU Time, the second largest is lucky_harvester with only 4 minutes.

I'm using one raspberry as full_node and two other raspberries as remote harvesters. I do the same with all the 15 forks.

There is probably something wrong in the remote harvester - full node communication? Logs do not show anything unusual. I think it is not related to the changes in chia 1.2.11 as I haven't seen high CPU usage on any harvester in the past.

Motophan commented 2 years ago

2021-11-27T05:39:59.323 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.336 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.375 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.388 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.435 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.448 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.539 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.559 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.608 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.628 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting

I am a remote harvester, and q-ing up plots takes forever.

jfikar commented 2 years ago

I've also seen these messages, but I think only before I staked. After staking the messages are gone, but high CPU usage stays.

albertcoady commented 2 years ago

2021-11-27T05:39:59.323 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.336 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.375 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.388 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.435 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.448 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.539 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.559 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting 2021-11-27T05:39:59.608 full_node full_node_server : WARNING Peer surpassed rate limit 127.0.0.1, message: request_stakings, port 37590 but not disconnecting 2021-11-27T05:39:59.628 wallet wallet_server : WARNING Peer surpassed rate limit 127.0.0.1, message: respond_stakings, port 22222 but not disconnecting

I am a remote harvester, and q-ing up plots takes forever.

These warnings will happen while wallet is syncing, it is OK to ignore.

Motophan commented 2 years ago

why is this closed

Motophan commented 2 years ago

@albertcoady