Skip to content

Commit

Permalink
[doc]configuration descriptions (vesoft-inc#1413)
Browse files Browse the repository at this point in the history
* configuration descriptions

* update TOC

* laura

* wilson

* laura

* add doc summary
  • Loading branch information
amber-moe authored and dutor committed Dec 16, 2019
1 parent 2382d62 commit aacb60d
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# 配置文件说明

本文介绍 `etc/` 目录下配置文件所对应参数。

## Meta Service

属性名 | 默认值 | 说明
--------------------------- | ------------------------ | -----------
`port` | 45500 | Meta daemon 监听端口
`reuse_port` | true | 开启 SO_REUSEPORT 选项
`data_path` | "" | 根数据路径,不支持多条路径
`meta_server_addrs` | "" | 一系列由逗号分隔的 IP 地址,用于集群部署,IP 数与副本数相等,如果为空,则表明是单机
`local_ip` | "" | 为 NetworkUtils :: getLocalIP 指定本地 IP
`num_io_threads` | 16 | IO 线程数
`meta_http_thread_num` | 3 | meta daemon 的 http 线程数
`num_worker_threads` | 32 | worker 数
`part_man_type` | memory | memory,meta
`pid_file` | "pids/nebula-metad.pid" | 存储进程 ID 的文件
`daemonize` | true | 作为 daemon 进程运行
`cluster_id` | 0 | 集群的唯一 ID
`meta_ingest_thread_num` | 3 | Meta daemon 的 ingest 线程数
`ws_http_port` | 11000 | Meta HTTP 协议监听端口默认值为 11000
`ws_h2_port` | 11002 | Meta HTTP/2 协议监听端口默认值为 11002
`ws_ip` | "127.0.0.1" | IP/Hostname 绑定地址
`ws_threads` | 4 | web service 线程数

## Storage Service

属性名 | 默认值 | 说明
----------------------------------- | -------------------------- | -----------
`port` | 44500 | Storage daemon 监听端口
`reuse_port` | true | 开启 SO_REUSEPORT 选项
`data_path` | "" | 根数据路径,多条路径由逗号分隔,对于 RocksDB 引擎,一个路径为一个实例
`local_ip` | "" | IP 地址和监听端口共同用于标识此服务器
`daemonize` | true | 作为 daemon 进程运行
`pid_file` | "pids/nebula-storaged.pid" | 存储进程 ID 的文件
`meta_server_addrs` | "" | meta server 地址列表,格式为 ip1:port1, ip2:port2, ip3:port3
`store_type` | "nebula" | storage daemon 使用的 KVStore 类型,可选类型为 nebula、HBase 等
`num_io_threads` | 16 | IO 线程数
`storage_http_thread_num` | 3 | storage daemon 的 http 线程数
`num_worker_threads` | 32 | worker 数
`engine_type` | rocksdb | RocksDB, memory ...
`custom_filter_interval_secs` | 24 * 3600 | 触发自定义压缩间隔
`num_workers` | 4 | worker 线程数
`rocksdb_disable_wal` | false | 禁用 RocksDB 的 WAL
`rocksdb_db_options` | "{}" | DBOptions 的 Json 字符串,所有键值均为字符串
`rocksdb_column_family_options` | "{}" | ColumnFamilyOptions 的 Json 字符串,所有键值均为字符串
`rocksdb_block_based_table_options` | "{}" | BlockBasedTableOptions 的 Json 字符串,所有键值均为字符串
`rocksdb_batch_size` | 4 * 1024 | 单个批处理的默认保留字节
`rocksdb_block_cache` | 4 | BlockBasedTable 使用的默认块缓存大小。单位是 MB。
`download_thread_num` | 3 | 下载线程数
`min_vertices_per_bucket` | 3 | 一个 bucket 中最小节点数
`max_appendlog_batch_size` | 128 | 每个 appendLog 批请求的最大 log 数
`max_outstanding_requests` | 1024 | outstanding appendLog 请求最大数
`raft_rpc_timeout_ms` | 500 | raft 客户端 RPC 超时时长,单位毫秒
`raft_heartbeat_interval_secs` | 5 | 每次心跳间隔时长,单位秒
`max_batch_size` | 256 | 一个 batch 中最大 log 数
`ws_http_port` | 12000 | Storage HTTP 12000
`ws_h2_port` | 12002 | Storage HTTP/2 协议监听端口默认值为 12002
`ws_ip` | "127.0.0.1" | IP/Hostname 绑定地址
`ws_threads` | 4 | web service 线程数

## Graph Service

属性名 | 默认值 | 说明
------------------------------- | ------------------------ | -----------
`port` | 3699 | Nebula Graph daemon 监听端口
`client_idle_timeout_secs` | 0 | 关闭 idle 连接前的时长(单位秒), 0 为无穷大
`session_idle_timeout_secs` | 600 | idle sessions 过期时长(单位秒),0 为无穷大
`session_reclaim_interval_secs` | 10 | 超出指定时间则认为超时
`num_netio_threads` | 0 | networking 线程数,0为物理 CPU 核数
`num_accept_threads` | 1 | 接受进入连接的线程数
`num_worker_threads` | 0 | 执行用户请求的线程数,线程数为系统 CPU 核数
`reuse_port` | false | 开启 SO_REUSEPORT 选项
`listen_backlog` | 1024 | listen socket 的 backlog
`listen_netdev` | "any" | 监听的网络服务
`pid_file` | "pids/nebula-graphd.pid" | 存储进程 ID 的文件
`redirect_stdout` | true | 将 stdout 和 stderr 重定向到单独的文件
`stdout_log_file` | "graphd-stdout.log" | stdout 目标文件名
`stderr_log_file` | "graphd-stderr.log" | stderr 目标文件名
`daemonize` | true | 作为 daemon 进程运行
`meta_server_addrs` | "" | meta server 地址列表,格式为 ip1:port1, ip2:port2, ip3:port3
`ws_http_port` | 13000 | Graph HTTP 协议监听端口默认值为 13000
`ws_h2_port` | 13002 | Graph HTTP/2 协议监听端口默认值为 13002
`ws_ip` | "127.0.0.1" | IP/Hostname 绑定地址
`ws_threads` | 4 | web service 线程数

## Console

属性名 | 默认值 | 说明
------------------------ | ------------- | -----------
`addr` | "127.0.0.1" | Graph daemon IP 地址
`port` | 0 | Graph daemon 监听端口
`u` | "" | 用于身份验证的用户名
`p` | "" | 用于身份验证的密码
`enable_history` | false | 是否保存历史命令
`server_conn_timeout_ms` | 1000 | 连接超时时长,单位毫秒
1 change: 1 addition & 0 deletions docs/manual-CN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@

* 部署与运维
* 部署
* [配置文件说明](3.build-develop-and-administration/3.deploy-and-administrations/deployment/configuration-description.md)
* [用 Docker 部署](3.build-develop-and-administration/3.deploy-and-administrations/deployment/deploy-cluster-on-docker.md)
* [部署集群](3.build-develop-and-administration/3.deploy-and-administrations/deployment/deploy-cluster.md)
* [连接 Prometheus](3.build-develop-and-administration/3.deploy-and-administrations/deployment/connect-prometheus.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Configuration Description

This documentation details the descriptions of the configuration files under the `etc/` directory.

## Meta Service

Property Name | Default Value | Description
--------------------------- | ------------------------ | -----------
`port` | 45500 | Meta daemon listening port.
`reuse_port` | true | Whether to turn on the SO_REUSEPORT option.
`data_path` | "" | Root data path. Multi-paths are not supported.
`meta_server_addrs` | "" | A list of IPs split by comma, used in cluster deployment, the number of IPs is equal to that of the replica. If empty, it means a single node.
`local_ip` | "" | Local ip specified for NetworkUtils::getLocalIP.
`num_io_threads` | 16 | Number of IO threads.
`meta_http_thread_num` | 3 | Number of meta daemon's http thread.
`num_worker_threads` | 32 | Number of workers.
`part_man_type` | memory | Memory, meta.
`pid_file` | "pids/nebula-metad.pid" | File to hold the process ID.
`daemonize` | true | Whether run as a daemon process.
`cluster_id` | 0 | A unique id for each cluster.
`meta_ingest_thread_num` | 3 | Meta daemon's ingest thread number.
`ws_http_port` | 11000 | Port to listen on Meta with HTTP protocol are 11000.
`ws_h2_port` | 11002 | Port to listen on Meta with HTTP/2 protocol is 11002.
`ws_ip` | "127.0.0.1" | IP/Hostname to bind to.
`ws_threads` | 4 | Number of threads for the web service.

## Storage Service

Property Name | Default Value | Description
----------------------------------- | -------------------------- | -----------
`port` | 44500 | Storage daemon listening port.
`reuse_port` | true | Whether to turn on the SO_REUSEPORT option.
`data_path` | "" | Root data path, multi paths should be split by comma. For RocksDB engine, one path one instance.
`local_ip` | "" | IP address used to identify this server, combined with the listen port.
`daemonize` | true | Whether to run the process as a daemon.
`pid_file` | "pids/nebula-storaged.pid" | File to hold the process ID.
`meta_server_addrs` | "" | List of meta server addresses, the format looks like ip1:port1, ip2:port2, ip3:port3.
`store_type` | "nebula" | Which type of KVStore to be used by the storage daemon. Options can be nebula, HBase, etc.
`num_io_threads` | 16 | Number of IO threads.
`storage_http_thread_num` | 3 | Number of storage daemon's http thread.
`num_worker_threads` | 32 | Number of workers.
`engine_type` | rocksdb | RocksDB, memory...
`custom_filter_interval_secs` | 24 * 3600 | Interval to trigger custom compaction.
`num_workers` | 4 | Number of worker threads.
`rocksdb_disable_wal` | false | Whether to disable the WAL in RocksDB.
`rocksdb_db_options` | "{}" | Json string of DBOptions, all keys and values are string.
`rocksdb_column_family_options` | "{}" | Json string of ColumnFamilyOptions, all keys and values are string.
`rocksdb_block_based_table_options` | "{}" | Json string of BlockBasedTableOptions, all keys and values are string.
`rocksdb_batch_size` | 4 * 1024 | Default reserved bytes for one batch operation.
`rocksdb_block_cache` | 1024 | The default block cache size used in BlockBasedTable. The unit is MB.
`download_thread_num` | 3 | Download thread number.
`min_vertices_per_bucket` | 3 | The min vertices number in one bucket.
`max_appendlog_batch_size` | 128 | The max number of logs in each appendLog request batch.
`max_outstanding_requests` | 1024 | The max number of outstanding appendLog requests.
`raft_rpc_timeout_ms` | 500 | RPC timeout for raft client.
`raft_heartbeat_interval_secs` | 5 | Seconds between each heartbeat.
`max_batch_size` | 256 | The max number of logs in a batch.
`ws_http_port` | 12000 | Port to listen on Storage with HTTP protocol is 12000.
`ws_h2_port` | 12002 | Port to listen on Storage with HTTP/2 protocol is 12002.
`ws_ip` | "127.0.0.1" | IP/Hostname to bind to.
`ws_threads` | 4 | Number of threads for the web service.

## Graph Service

Property Name | Default Value | Description
------------------------------- | ------------------------ | -----------
`port` | 3699 | Nebula Graph daemon's listen port.
`client_idle_timeout_secs` | 0 | Seconds before we close the idle connections, 0 for infinite.
`session_idle_timeout_secs` | 600 | Seconds before we expire the idle sessions, 0 for infinite.
`session_reclaim_interval_secs` | 10 | Period we try to reclaim expired sessions.
`num_netio_threads` | 0 | Number of networking threads, 0 for number of physical CPU cores.
`num_accept_threads` | 1 | Number of threads to accept incoming connections.
`num_worker_threads` | 0 | Number of threads to execute user queries.
`reuse_port` | false | Whether to turn on the SO_REUSEPORT option.
`listen_backlog` | 1024 | Backlog of the listen socket.
`listen_netdev` | "any" | The network device to listen on.
`pid_file` | "pids/nebula-graphd.pid" | File to hold the process ID.
`redirect_stdout` | true | Whether to redirect stdout and stderr to separate files.
`stdout_log_file` | "graphd-stdout.log" | Destination filename of stdout.
`stderr_log_file` | "graphd-stderr.log" | Destination filename of stderr.
`daemonize` | true | Whether run as a daemon process.
`meta_server_addrs` | "" | List of meta server addresses, the format looks like ip1:port1, ip2:port2, ip3:port3.
`ws_http_port` | 13000 | Port to listen on Graph with HTTP protocol is 13000.
`ws_h2_port` | 13002 | Port to listen on Graph with HTTP/2 protocol is 13002.
`ws_ip` | "127.0.0.1" | IP/Hostname to bind to.
`ws_threads` | 4 | Number of threads for the web service.

## Console

Property Name | Default Value | Description
------------------------ | ------------- | -----------
`addr` | "127.0.0.1" | Graph daemon IP address.
`port` | 0 | Graph daemon listening port.
`u` | "" | Username used to authenticate.
`p` | "" | Password used to authenticate.
`enable_history` | false | Whether to force saving the command history.
`server_conn_timeout_ms` | 1000 | Connection timeout in milliseconds.
1 change: 1 addition & 0 deletions docs/manual-EN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ It is the optimal solution in the world capable of hosting graphs with dozens of

* Deploy and Administrations
* Deployment
* [Configuration Description](3.build-develop-and-administration/3.deploy-and-administrations/deployment/configuration-description.md)
* [Deploy Cluster On Docker](3.build-develop-and-administration/3.deploy-and-administrations/deployment/deploy-cluster-on-docker.md)
* [Deploy Cluster](3.build-develop-and-administration/3.deploy-and-administrations/deployment/deploy-cluster.md)
* [Connect Prometheus](3.build-develop-and-administration/3.deploy-and-administrations/deployment/connect-prometheus.md)
Expand Down
8 changes: 4 additions & 4 deletions src/daemons/MetaDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ using nebula::Status;
DEFINE_int32(port, 45500, "Meta daemon listening port");
DEFINE_bool(reuse_port, true, "Whether to turn on the SO_REUSEPORT option");
DEFINE_string(data_path, "", "Root data path");
DEFINE_string(meta_server_addrs, "", "It is a list of IPs split by comma,"
"the ips number equals replica number."
"If empty, it means replica is 0");
DEFINE_string(local_ip, "", "Local ip speicified for NetworkUtils::getLocalIP");
DEFINE_string(meta_server_addrs, "", "It is a list of IPs split by comma, used in cluster deployment"
"the ips number is equal to the replica number."
"If empty, it means it's a single node");
DEFINE_string(local_ip, "", "Local ip specified for NetworkUtils::getLocalIP");
DEFINE_int32(num_io_threads, 16, "Number of IO threads");
DEFINE_int32(meta_http_thread_num, 3, "Number of meta daemon's http thread");
DEFINE_int32(num_worker_threads, 32, "Number of workers");
Expand Down

0 comments on commit aacb60d

Please sign in to comment.