nervosnetwork/ckb

Config Generator Based On Hardware Resources

Open

#3,514 建立於 2022年7月27日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Rust (260 fork)user submission
good first issuepinnedstalet:enhancement

倉庫指標

Star
 (1,210 star)
PR 合併指標
 (平均合併 13天 23小時) (30 天內合併 29 個 PR)

描述

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.

貢獻者指南