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. You can use them in different scenarios. The default file path is /usr/local/nebula/etc/.

How to use the configuration files

The Graph Service gets its configuration from the nebula-graphd.conf file. You have to remove the suffix .default or .production from an initial configuration file for the Graph Service to apply the configuration defined in it.

If you have modified the configuration in the file and want new configuration to take effect, add --local_conf=true at the top of the file. Otherwise, Nebula Graph reads the cached configuration.

About parameter values

If a parameter is not set in the configuration file, Nebula Graph uses its default value.

Note

The default value of a parameter in Nebula Graph may be different from the predefined value in the .default and .production files.

The predefined parameters in nebula-graphd.conf.default and nebula-graphd.conf.production are different. And not all parameters are predefined. This topic uses the parameters in nebula-graphd.conf.default.

Basic configurations

Name Predefine Value Descriptions
daemonize true When set to true, the process is a daemon process.
pid_file pids/nebula-graphd.pid File to host 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. You can manually set it if you need it. 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=CST-8 represents the GMT+8 time zone.

Note

  • While inserting time-type property values except timestamps, Nebula Graph transforms them to a UTC time according to the time zone specified with the timezone_name parameter in the configuration files. 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 Predefine Value Descriptions
log_dir logs Directory to the Graph Service log. We recommend that you put logs on a different hard disk from the data_path.
minloglevel 0 Specifies the minimum log level. Available values are 0 (INFO), 1 (WARNING), 2 (ERROR), and 3 (FATAL). We suggest that you set minloglevel to 0 for debugging and 1 for production. When you set it to 4, Nebula Graph does not print any logs.
v 0 Specifies the verbose log level. Available values are 0-4. The larger the value, the more verbose the log.
logbufsecs 0 Specifies the maximum time to buffer the logs. The configuration is measured in seconds.
redirect_stdout true When set to true, stdout and stderr are redirected.
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 minimum level to copy the log messages to stderr.

Networking configurations

Name Predefine Value Descriptions
meta_server_addrs 127.0.0.1:9559 Specifies the IP addresses and ports of all Meta Services. Separate multiple addresses with commas.
local_ip 127.0.0.1 Specifies the local IP for the Graph Service.
listen_netdev any Specifies the network device to listen on.
port 9669 Specifies RPC daemon listening port. The external port for the Graph Service is 9669.
reuse_port false When set to false, the SO_REUSEPORT is closed.
listen_backlog 1024 Specifies the backlog for the listen socket. You must modify this configuration together with the net.core.somaxconn.
client_idle_timeout_secs 0 Specifies the time to close an idle connection. This configuration is measured in seconds.
session_idle_timeout_secs 0 Specifies the time to expire an idle session. This configuration is measured in seconds.
num_accept_threads 1 Specifies the thread number to accept incoming connections.
num_netio_threads 0 Specifies the networking IO threads number. 0 is the number of CPU cores.
num_worker_threads 0 Specifies the thread number to execute user 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 in seconds. Make sure the heartbeat_interval_secs values for all services are the same, otherwise Nebula Graph CANNOT work normally.
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.

Note

We recommend that you use the real IP address in your configuration because sometimes 127.0.0.1 can not be parsed correctly.

Charset and collate configurations

Name Predefine Value Descriptions
default_charset utf8 Specifies the default charset when you create a new graph space.
default_collate utf8_bin Specifies the default collate when you create a new graph space.

Authorization and authentication configurations

Name Predefine Value Descriptions
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.

If you have set enable_authorize to true, you can only log in with the root account. For example:

/usr/local/nebula/bin/nebula -u root -p nebula --addr=127.0.0.1 --port=9669

If you have set enable_authorize to false, you can log in with any account and password. For example:

/usr/local/nebula/bin/nebula -u any -p 123 --addr=127.0.0.1 --port=9669

Last update: April 22, 2021