NebulaGraph provides two initial configuration files for the Graph Service, nebula-graphd.conf.default and nebula-graphd.conf.production. Users can use them in different scenarios conveniently. The default file path is /usr/local/nebula/etc/.
Caution
It is not recommended to modify the value of local_config to false. If modified, the NebulaGraph service will first read the cached configurations, which may cause configuration inconsistencies between clusters and cause unknown risks.
It is not recommended to modify the configurations that are not introduced in this topic, unless you are familiar with the source code and fully understand the function of configurations.
To use the initial configuration file, choose one of the above two files and delete the suffix .default or .production from the initial configuration file for the Meta Service to apply the configurations defined in it.
If a parameter is not set in the configuration file, NebulaGraph uses the default value. Not all parameters are predefined. And the predefined parameters in the two initial configuration files are different. This topic uses the parameters in nebula-metad.conf.default.
For all parameters and their current values, see Configurations.
When set to true, the process is a daemon process.
pid_file
pids/nebula-graphd.pid
The file that records the process ID.
enable_optimizer
true
When set to true, the optimizer is enabled.
timezone_name
-
Specifies the NebulaGraph time zone. This parameter is not predefined in the initial configuration files. The system default value is UTC+00:00:00. For the format of the parameter value, see Specifying the Time Zone with TZ. For example, --timezone_name=UTC+08:00 represents the GMT+8 time zone.
local_config
true
When set to true, the process gets configurations from the configuration files.
Note
While inserting property values of time types, NebulaGraph transforms time types (except TIMESTAMP) to the corresponding UTC according to the time zone specified by timezone_name. The time-type values returned by nGQL queries are all UTC time.
timezone_name is only used to transform the data stored in NebulaGraph. Other time-related data of the NebulaGraph processes still uses the default time zone of the host, such as the log printing time.
The directory that stores the Meta Service log. It is recommended to put logs on a different hard disk from the data.
minloglevel
0
Specifies the minimum level of the log. That is, no logs below this level will be printed. Optional values are 0 (INFO), 1 (WARNING), 2 (ERROR), 3 (FATAL). It is recommended to set it to 0 during debugging and 1 in a production environment. If it is set to 4, NebulaGraph will not print any logs.
v
0
Specifies the detailed level of the log. The larger the value, the more detailed the log is. Optional values are 0, 1, 2, 3.
logbufsecs
0
Specifies the maximum time to buffer the logs. If there is a timeout, it will output the buffered log to the log file. 0 means real-time output. This configuration is measured in seconds.
redirect_stdout
true
When set to true, the process redirects thestdout and stderr to separate output files.
stdout_log_file
graphd-stdout.log
Specifies the filename for the stdout log.
stderr_log_file
graphd-stderr.log
Specifies the filename for the stderr log.
stderrthreshold
2
Specifies the minloglevel to be copied to the stderr log.
timestamp_in_logfile_name
true
Specifies if the log file name contains a timestamp. true indicates yes, false indicates no.
When set to false, the process treats partial success as an error. This configuration only applies to read-only requests. Write requests always treat partial success as an error.
session_reclaim_interval_secs
10
Specifies the interval that the Session information is sent to the Meta service. This configuration is measured in seconds.
max_allowed_query_size
4194304
Specifies the maximum length of queries. Unit: bytes. The default value is 4194304, namely 4MB.
Specifies the IP addresses and ports of all Meta Services. Multiple addresses are separated with commas.
local_ip
127.0.0.1
Specifies the local IP for the Graph Service. The local IP address is used to identify the nebula-graphd process. If it is a distributed cluster or requires remote access, modify it to the corresponding address.
listen_netdev
any
Specifies the listening network device.
port
9669
Specifies RPC daemon listening port of the Graph service.
reuse_port
false
When set to false, the SO_REUSEPORT is closed.
listen_backlog
1024
Specifies the maximum length of the connection queue for socket monitoring. This configuration must be modified together with the net.core.somaxconn.
client_idle_timeout_secs
28800
Specifies the time to expire an idle connection. The value ranges from 1 to 604800. The default is 8 hours. This configuration is measured in seconds.
session_idle_timeout_secs
28800
Specifies the time to expire an idle session. The value ranges from 1 to 604800. The default is 8 hours. This configuration is measured in seconds.
num_accept_threads
1
Specifies the number of threads that accept incoming connections.
num_netio_threads
0
Specifies the number of networking IO threads. 0 is the number of CPU cores.
num_worker_threads
0
Specifies the number of threads that execute queries. 0 is the number of CPU cores.
ws_ip
0.0.0.0
Specifies the IP address for the HTTP service.
ws_http_port
19669
Specifies the port for the HTTP service.
heartbeat_interval_secs
10
Specifies the default heartbeat interval. Make sure the heartbeat_interval_secs values for all services are the same, otherwise NebulaGraph CANNOT work normally. This configuration is measured in seconds.
storage_client_timeout_ms
-
Specifies the RPC connection timeout threshold between the Graph Service and the Storage Service. This parameter is not predefined in the initial configuration files. You can manually set it if you need it. The system default value is 60000 ms.
slow_query_threshold_us
200000
When the execution time of a query exceeds the value, the query is called a slow query. Unit: Microsecond.
ws_meta_http_port
19559
Specifies the Meta service listening port used by the HTTP protocol. It must be consistent with the ws_http_port in the Meta service configuration file.
Caution
The real IP address must be used in the configuration file. Otherwise, 127.0.0.1/0.0.0.0 cannot be parsed correctly in some cases.
Specifies the trigger threshold of the high-level memory alarm mechanism. If the system memory usage is higher than this value, an alarm mechanism will be triggered, and NebulaGraph will stop querying. This parameter is not predefined in the initial configuration files.
Enable or disable space-level metrics. Such metric names contain the name of the graph space that it monitors, for example, query_latency_us{space=basketballplayer}.avg.3600. You can view the supported metrics with the curl command. For more information, see Query NebulaGraph metrics.
Specifies the experimental feature. Optional values are true and false. For currently supported experimental features, see below.
enable_toss
false
Whether to enable the TOSS feature. The TOSS (Transaction on Storage Side) feature is used to ensure the final consistency of the INSERT, UPDATE, UPSERT, or DELETE operations on edges (because one edge logically corresponds to two key-value pairs on the hard disk). After the TOSS function is enabled, the time delay of related operations will be increased by about one time. Only works when enable_experimental_feature is true.
enable_data_balance
true
Whether to enable the BALANCE DATA feature. Only works when enable_experimental_feature is true.
The TOSS (Transaction on Storage Side) function is used to ensure the final consistency of the INSERT, UPDATE, UPSERT, or DELETE operations on edges (because one edge logically corresponds to two key-value pairs on the hard disk). After the TOSS function is enabled, the time delay of related operations will be increased by about one time.