Skip to content

Commit 7d0eede

Browse files
Copilotfengjiachun
andauthored
docs: add objbench subcommand documentation for datanode (#2204)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fengjiachun <3860496+fengjiachun@users.noreply.github.com>
1 parent b814a27 commit 7d0eede

File tree

2 files changed

+86
-9
lines changed
  • docs/reference/command-lines
  • i18n/zh/docusaurus-plugin-content-docs/current/reference/command-lines

2 files changed

+86
-9
lines changed

docs/reference/command-lines/datanode.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ description: Comprehensive guide to GreptimeDB datanode command-line interface,
55

66
# Datanode
77

8-
## Subcommand options
8+
The `greptime datanode` command provides subcommands for managing and benchmarking datanode instances.
9+
10+
## start
11+
12+
Start the datanode service.
13+
14+
### Options
915

1016
You can list all the options from the following command:
1117

@@ -28,9 +34,9 @@ greptime datanode start --help
2834

2935
All the `addr` options are in the form of `ip:port`.
3036

31-
## Examples
37+
### Examples
3238

33-
### Start service with configurations
39+
#### Start service with configurations
3440

3541
Starts a datanode instance with customized configurations:
3642

@@ -44,4 +50,37 @@ Starts a datanode instance with command line arguments specifying the gRPC servi
4450
greptime datanode start --rpc-bind-addr=0.0.0.0:4001 --mysql-addr=0.0.0.0:4002 --metasrv-addrs=0.0.0.0:3002 --node-id=1
4551
```
4652

47-
The `datanode.example.toml` configuration file comes from the `config` directory of the `[GreptimeDB](https://github.com/GreptimeTeam/greptimedb/)` repository. You can find more example configuration files there. The `-c` option specifies the configuration file, for more information check [Configuration](/user-guide/deployments-administration/configuration.md).
53+
The `datanode.example.toml` configuration file comes from the `config` directory of the `[GreptimeDB](https://github.com/GreptimeTeam/greptimedb/)` repository. You can find more example configuration files there. The `-c` option specifies the configuration file, for more information check [Configuration](/user-guide/deployments-administration/configuration.md).
54+
55+
## objbench
56+
57+
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.
58+
59+
### Options
60+
61+
| Option | Description |
62+
| ------------------------------ | ------------------------------------------------------------------------------------------------ |
63+
| `--config <FILE>` | Path to the datanode configuration file (TOML format) |
64+
| `--source <PATH>` | Source SST file path in object storage (e.g., `data/greptime/public/1024/1024_0000000000/metadata/<uuid>.parquet`) |
65+
| `-v`/`--verbose` | Enable verbose output |
66+
| `--pprof-file <FILE>` | Output file path for pprof flamegraph (enables profiling). Generates an SVG flamegraph file |
67+
68+
### Examples
69+
70+
#### Basic benchmark
71+
72+
Measure the read/write performance of a specific file:
73+
74+
```sh
75+
greptime datanode objbench --config ./datanode.toml --source data/greptime/public/1024/1024_0000000000/metadata/8fb41bc7-a106-4b9e-879b-392da799f958.parquet
76+
```
77+
78+
#### Benchmark with profiling
79+
80+
Measure performance and generate a flamegraph for performance analysis:
81+
82+
```sh
83+
greptime datanode objbench --config ./datanode.toml --source data/greptime/public/1024/1024_0000000000/metadata/8fb41bc7-a106-4b9e-879b-392da799f958.parquet --pprof-file=./flamegraph.svg
84+
```
85+
86+
This will generate a flamegraph in SVG format that can be opened in a web browser for performance analysis.

i18n/zh/docusaurus-plugin-content-docs/current/reference/command-lines/datanode.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ description: GreptimeDB datanode 命令行界面完整指南,包括配置选
55

66
# Datanode
77

8-
## 子命令选项
8+
`greptime datanode` 命令提供了用于管理和基准测试 datanode 实例的子命令。
9+
10+
## start
11+
12+
启动 datanode 服务。
13+
14+
### 选项
915

1016
你可以通过以下命令列出所有选项:
1117

@@ -28,10 +34,9 @@ greptime datanode start --help
2834

2935
所有的 `addr` 类选项都是 `ip:port` 形式的字符串。
3036

37+
### 示例
3138

32-
## 示例
33-
34-
### 使用配置启动服务
39+
#### 使用配置启动服务
3540

3641
使用自定义配置启动 Datanode 实例:
3742

@@ -45,4 +50,37 @@ greptime datanode start -c config/datanode.example.toml
4550
greptime datanode start --rpc-bind-addr=0.0.0.0:4001 --mysql-addr=0.0.0.0:4002 --metasrv-addrs=0.0.0.0:3002 --node-id=1
4651
```
4752

48-
`datanode.example.toml` 配置文件来自 `[GreptimeDB](https://github.com/GreptimeTeam/greptimedb/)` 仓库的 `config` 目录。你可以在那里找到更多示例配置文件。`-c` 选项指定配置文件,更多信息请参考 [Configuration](/user-guide/deployments-administration/configuration.md)
53+
`datanode.example.toml` 配置文件来自 `[GreptimeDB](https://github.com/GreptimeTeam/greptimedb/)` 仓库的 `config` 目录。你可以在那里找到更多示例配置文件。`-c` 选项指定配置文件,更多信息请参考 [Configuration](/user-guide/deployments-administration/configuration.md)
54+
55+
## objbench
56+
57+
`objbench` 子命令是一个用于测量对象存储上特定文件读写性能的基准测试工具。这对于诊断性能问题和测试存储层性能非常有用。
58+
59+
### 选项
60+
61+
| 选项 | 描述 |
62+
| ------------------------------ | ---------------------------------------------------------------------------------------------------- |
63+
| `--config <FILE>` | datanode 配置文件路径(TOML 格式) |
64+
| `--source <PATH>` | 对象存储中的源 SST 文件路径(例如 `data/greptime/public/1024/1024_0000000000/metadata/<uuid>.parquet`|
65+
| `-v`/`--verbose` | 启用详细输出 |
66+
| `--pprof-file <FILE>` | pprof 火焰图的输出文件路径(启用性能分析)。生成 SVG 格式的火焰图文件 |
67+
68+
### 示例
69+
70+
#### 基础基准测试
71+
72+
测量特定文件的读写性能:
73+
74+
```sh
75+
greptime datanode objbench --config ./datanode.toml --source data/greptime/public/1024/1024_0000000000/metadata/8fb41bc7-a106-4b9e-879b-392da799f958.parquet
76+
```
77+
78+
#### 带性能分析的基准测试
79+
80+
测量性能并生成用于性能分析的火焰图:
81+
82+
```sh
83+
greptime datanode objbench --config ./datanode.toml --source data/greptime/public/1024/1024_0000000000/metadata/8fb41bc7-a106-4b9e-879b-392da799f958.parquet --pprof-file=./flamegraph.svg
84+
```
85+
86+
这将生成一个 SVG 格式的火焰图,可以在 Web 浏览器中打开进行性能分析。

0 commit comments

Comments
 (0)