Skip to content

Commit

Permalink
[benchmark] feat:add dstat
Browse files Browse the repository at this point in the history
  • Loading branch information
hegongshan committed Jun 26, 2023
1 parent 621064c commit 7a2900d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
39 changes: 39 additions & 0 deletions docs/benchmark/dstat.md
Original file line number Diff line number Diff line change
@@ -0,0 1,39 @@
dstat

```bash
$ dstat --fs --noupdate 2 2
--filesystem-
files inodes
4693 132k
4693 132k
```

files和inodes的值来自于以下两个文件:

* /proc/sys/fs/file-nr

> https://www.kernel.org/doc/html/latest/admin-guide/sysctl/fs.html#file-max-file-nr
```bash
$ cat /proc/sys/fs/file-nr
4437 0 9223372036854775807
```

file-nr文件中的三个值分别表示:

1.已分配的文件句柄数

2.已分配但未使用的文件句柄数。该值始终为0,也就是说,已分配的文件句柄数与已使用的文件句柄数完全匹配。

3.文件句柄的最大数量

* /proc/sys/fs/inode-nr

> https://www.kernel.org/doc/html/latest/admin-guide/sysctl/fs.html#inode-max-inode-nr-inode-state
```bash
$ cat /proc/sys/fs/inode-nr
132971 471
```

`inode-nr`文件中的两个值分别为nr_inodes(即已分配的inode数)和nr_free_inodes(即空闲的inode数量)。
2 changes: 2 additions & 0 deletions docs/benchmark/fio.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 123,14 @@ group_reporting
[randwrite]
description="Random Write"
rw=randwrite
size=1G
bs=4K
iodepth=16

[seqwrite]
description="Sequential Write"
rw=write
size=1G
bs=4M
iodepth=1
```
Expand Down
2 changes: 1 addition & 1 deletion docs/benchmark/ior.md
Original file line number Diff line number Diff line change
@@ -1,4 1,4 @@
数据带宽测试之IOR
IOR(Interleave Or Random)是一个数据带宽测试工具。

### 安装IOR

Expand Down

0 comments on commit 7a2900d

Please sign in to comment.