Datanode
The greptime datanode command provides subcommands for managing and benchmarking datanode instances.
start
Start the datanode service.
Options
Print the options supported by the current binary:
greptime datanode start --help
| Option | Description |
|---|---|
-c/--config-file <CONFIG_FILE> | The configuration file for datanode |
--data-home <DATA_HOME> | Database storage root directory |
--env-prefix <ENV_PREFIX> | The prefix of environment variables, default is GREPTIMEDB_DATANODE |
--http-addr <HTTP_ADDR> | HTTP server address |
--http-timeout <HTTP_TIMEOUT> | HTTP request timeout in seconds |
--log-dir <LOG_DIR> | Log directory |
--log-level <LOG_LEVEL> | Log level |
--metasrv-addrs <METASRV_ADDRS>... | Metasrv address list |
--node-id <NODE_ID> | The datanode ID |
--grpc-bind-addr <GRPC_BIND_ADDR> | The address to bind the gRPC server |
--grpc-server-addr <GRPC_SERVER_ADDR> | The address advertised to the metasrv, and used for connections from outside the host. If left empty or unset, the server will automatically use the IP address of the first network interface on the host, with the same port number as the one specified in grpc_bind_addr |
--wal-dir <WAL_DIR> | Overrides the WAL directory when using the Raft Engine WAL backend |
All the addr options are in the form of ip:port.
Examples
Start service with configurations
Start a Datanode instance from a configuration file:
greptime datanode start -c config/datanode.example.toml
Start a Datanode instance and specify its gRPC address, Metasrv address, and node ID on the command line:
greptime datanode start --grpc-bind-addr=0.0.0.0:4001 --metasrv-addrs=0.0.0.0:3002 --node-id=1
The datanode.example.toml file is in the GreptimeDB repository. The -c option selects the configuration file; see Configuration for details.
objbench
The objbench subcommand is a benchmarking tool for measuring read/write performance of specific files on object storage. This is useful for diagnosing performance issues and testing storage layer performance.
Options
| Option | Description |
|---|---|
--config <FILE> | Path to the datanode configuration file (TOML format) |
--source <PATH> | Source SST file path in object storage (e.g., data/greptime/public/1024/1024_0000000000/metadata/<uuid>.parquet) |
-v/--verbose | Enable verbose output |
--pprof-file <FILE> | Output file path for pprof flamegraph (enables profiling). Generates an SVG flamegraph file |