-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rocksdb-stats * update * update * update3 * fix dan
- Loading branch information
1 parent
dc5c71a
commit df8f1cb
Showing
7 changed files
with
81 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
.../manual-CN/3.build-develop-and-administration/7.monitor/5.rocksdb-statistics.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# RocksDB 统计功能 | ||
|
||
**Nebula Graph** 使用 RocksDB 作为其底层存储。本文档将教你如何收集和展示 **Nebula Graph** 的 RocksDB 统计信息。 | ||
|
||
## 启用 RocksDB 统计功能 | ||
|
||
RocksDB 统计功能默认为禁用状态。如果要启用 RocksDB 统计功能,你需要: | ||
|
||
- 在配置文件 `storaged.conf`,将 `--enable_rocksdb_statistics` 参数修改为 `true`。配置文件默认目录为 `/home/user/nebula/build/install/etc`。 | ||
- 重新启动服务以使修改生效。 | ||
|
||
启用此功能后,统计信息将定期转储到每个数据库服务的日志文件中。 | ||
|
||
## 获取 RocksDB 统计信息 | ||
|
||
你可以使用存储服务中的内置 Web 接口获取统计信息。使用 Web 服务获取 RocksDB 统计信息一共有三种方法: | ||
|
||
1. 获取全部统计信息; | ||
2. 获取指定条目的信息; | ||
3. 获取 JSON 格式的统计信息。 | ||
|
||
## 示例 | ||
|
||
使用以下命令获取所有 RocksDB 统计信息: | ||
|
||
```bash | ||
curl -L "http://${storage_ip}:${port}/rocksdb_stats" | ||
``` | ||
|
||
例如: | ||
|
||
```bash | ||
curl -L "http://172.28.2.1:12000/rocksdb_stats" | ||
|
||
rocksdb.blobdb.blob.file.bytes.read=0 | ||
rocksdb.blobdb.blob.file.bytes.written=0 | ||
rocksdb.blobdb.blob.file.bytes.synced=0 | ||
... | ||
``` | ||
|
||
使用以下命令获取部分 RocksDB 统计信息: | ||
|
||
```bash | ||
curl -L "http://${storage_ip}:${port}/rocksdb_stats?stats=${stats_name}" | ||
``` | ||
|
||
例如: | ||
|
||
```bash | ||
curl -L "http://172.28.2.1:12000/rocksdb_stats?stats=rocksdb.bytes.read,rocksdb.block.cache.add" | ||
|
||
rocksdb.block.cache.add=14 | ||
rocksdb.bytes.read=1632 | ||
``` | ||
|
||
使用以下命令获取部分 Json 格式的 RocksDB 统计信息: | ||
|
||
```bash | ||
curl -L "http://${storage_ip}:${port}/rocksdb_stats?stats=${stats_name}.&returnjson" | ||
``` | ||
|
||
例如: | ||
|
||
```bash | ||
curl -L "http://172.28.2.1:12000/rocksdb_stats?stats=rocksdb.bytes.read,rocksdb.block.cache.add&returnjson" | ||
|
||
[{"value":14,"name":rocksdb.block.cache.add},{"value":1632,"name":"rocksdb.bytes.read"}] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters