good first issuepinnedstalet:enhancement
Description
Feature Request
Is your feature request related to a problem? Please describe.
The default generated CKB config does not tune the options depend on the detected hardware resources. Instead the options are best suited for the recommended hardware specification: 4 CPU cores, 8G memory, and enough SSD disk space. This means CKB does not utilize all the resources when running on a more powerful machine.
Describe the solution you'd like
Although uses can tweak the config options, it's hard for most users to understand those options. It's also tedious to calculate and update a bunch of options. A facade can help where users provide simple hints about how many resources CKB can use and a config generator will generate the config file for the node.
The config generator have two interfaces:
- Interface for end user: which options the end user should provide, for example, number of cores, available memory, disk space, and network bandwidth.
- Interface for CKB. Which options should the generator change based on end user options?
- db-options file for rocksdb
- Memory limit for various caches in ckb.toml
- Thread pool size, which is not configurable but based on detected cores now.