nervosnetwork / nervosnetwork/ckb

Config Generator Based On Hardware Resources

Open
#3,514 2 comments 0 reactions 0 assignees View on GitHub
good first issue pinned stale t:enhancement
Dominant language
Rust
Stars
1.2k
Forks
266
Avg merge
10d 5h
Merged PRs (30d)
4

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.

Contributor guide

Open the contributing guide

Research direction

Start by defining the end-user inputs for CPU cores, memory, disk space, and network bandwidth described in the issue. Then map those inputs to the db-options file, cache limits in ckb.toml, and thread pool size. Done means the generator produces a node configuration tuned to the supplied hardware resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.