Bitcoin Core has been designed to synchronise/verify as fast as possible. This is usually desirable, though, on systems where other applications require a reasonable amount of CPU time (ex. desktop systems) the CPU usage maximisation of Bitcoin Core may be intrusive. While it is possible to configure Bitcoin Core to use less resources, it cannot be changed during runtime which leads to unideal user experience.
Profiles could help improve the situation by allowing to change the resource consumption profile during runtime.
Ideally, profiles could be recommended configuration sets for different machine- and use-case-types while the detailed settings could be tweaked via a configuration file (user defined resource profiles).
User profiles could work with the following settings (probably more)
-blocksonly
-maxuploadtarget
-maxconnections
-maxmempool
-mempoolexpiry
-minrelaytxfee
-onion
-onlynet
-par
-proxy
-whitelist
[low bandwidth]: -blocksonly=1, -maxuploadtarget=1 [low cpu]: -par=-1 [private]: -onion=1.2.3.4, -onlynet=onion [own-peer-mode]: -connect=1.2.3.4:8333 -whitelist=1.2.3.4;8333
The current configuration system is not made to be changed during runtime. This will require various refactorings.
- Start with an option to disable/enable script verification threads during run-time (low hanging fruit, most obvious usecase)
- Refactor a first set of configuration options to allow runtime value changes
- Expose configuration overrides via RPC
- Add 3 profiles [default], [low-cpu], [low-bandwith] and allow to change them via an RPC call
- Allow user-defined configuration profiles