Skip to content

Graph Service configuration

Nebula Graph 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 Nebula Graph 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.

How to use the configuration files

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.

About parameter values

If a parameter is not set in the configuration file, Nebula Graph 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.

Basics configurations

Name Predefined value Description
daemonize true 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 Nebula Graph 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, Nebula Graph 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 Nebula Graph. Other time-related data of the Nebula Graph processes still uses the default time zone of the host, such as the log printing time.

Logging configurations

Name Predefined value Description
log_dir logs 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, Nebula Graph 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.

Query configurations

Name Predefined value Description
accept_partial_success false 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.

Networking configurations

Name Predefined value Description
meta_server_addrs 127.0.0.1:9559 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 0 Specifies the time to expire an idle connection. 0 means that the connection will never expire. This configuration is measured in seconds.
session_idle_timeout_secs 0 Specifies the time to expire an idle session. 0 means that the session will never expire. 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.
ws_h2_port 19670 Specifies the port for the HTTP2 service.
heartbeat_interval_secs 10 Specifies the default heartbeat interval. Make sure the heartbeat_interval_secs values for all services are the same, otherwise Nebula Graph 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 60000ms.
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.

Charset and collate configurations

Name Predefined value Description
default_charset utf8 Specifies the default charset when creating a new graph space.
default_collate utf8_bin Specifies the default collate when creating a new graph space.

Authorization configurations

Name Predefined value Description
enable_authorize false When set to false, the system authentication is not enabled. For more information, see Authentication.
auth_type password Specifies the login method. Available values are password, ldap, and cloud.

Memory configurations

Name Predefined value Description
system_memory_high_watermark_ratio - Specifies the trigger threshold of the high-level memory alarm mechanism. The default value is 0.9. If the system memory usage is higher than this value, an alarm mechanism will be triggered, and Nebula Graph will stop querying. This parameter is not predefined in the initial configuration files.

Experimental configurations

Name Predefined value Description
enable_experimental_feature false Specifies the experimental feature. Optional values are true and false. For currently supported experimental features, see below.

Experimental features

Name Description
TOSS The TOSS (Transaction on Storage Side) function is used to ensure the final consistency of the INSERT, UPDATE, or UPSERT operations on edges (because one edge logically corresponds to two key-value pairs on the hard disk). The DELETE operation is not currently supported. After the TOSS function is enabled, the time delay of related operations will be increased by about one time.

Last update: October 15, 2021
Back to top