dream80 / lucky-blockchain

Good Luck!!
Apache License 2.0
11 stars 4 forks source link

added a config option to reduce the number of full_node worker processes to reduce ram usage #1

Closed grayfallstown closed 3 years ago

grayfallstown commented 3 years ago

The Issue: The biggest problem chia fork farmers face is ram usage. Many farmers simply do not have the ram required to run all the forks and my 64GB machine is at its limits as well

One Cause: By default, chia and its forks create number of logical cores - 2 start_full_node process. Each worker process takes 50MB RAM. On a typical 8 core, 16 threads CPU this is 700MB of RAM per chia fork. For 38 Forks this is about 26GB of ram for the full_nodes alone

One Solution: Give farmers the ability to limit the number of worker processes. Make this configurable, so pure, designated full_nodes can still use all cpu cores for their task, but allow farmers to reduce the CPU and RAM load of running a full_node

Pro:

Cons: Reducing the number of worker processes can reduce sync speed. This does not affect ongoing synchronization of synced nodes, only a node that is way behind the chain really benefits from many worker processes. The user has full control over that and can reduce the number of worker processes once synced or set them to a good compromise between resource consumption and sync speed, tailored for his machine

Changes:

Who is effected by this change:

dream80 commented 3 years ago

Very good improvement for people who have a lot of forks