Linux で CrystalDiskMark 8 ぽい計測をする

Summary

TrueNAS Scale の L2ARC や SLOG の効果テストのため速度テストしたくなったが、手元の Windows は 1GbE しかなく拡張も難しいため Linux で計測するために fio を使う。計測方法を CrystalDiskMark 8 に寄せるための設定をしたのでメモ

現物確認

手元の Windows で CrystalDiskMark を実行するとテキストで下記のようなファイルが得られる。

  • SEQ: は Sequential
  • RND: は Random
  • Q=: は I/O 深度 fio だと iodepth に相当
  • T=: は Thread 厳密には違うが fio だと numjobs に相当
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
------------------------------------------------------------------------------
CrystalDiskMark 8.0.4 x64 (C) 2007-2021 hiyohiyo
                                  Crystal Dew World: https://crystalmark.info/
------------------------------------------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes

[Read]
  SEQ    1MiB (Q=  8, T= 1):   118.467 MB/s [    113.0 IOPS] < 70170.13 us>
  SEQ    1MiB (Q=  1, T= 1):   111.463 MB/s [    106.3 IOPS] <  9388.15 us>
  RND    4KiB (Q= 32, T= 1):    88.317 MB/s [  21561.8 IOPS] <  1483.18 us>
  RND    4KiB (Q=  1, T= 1):    16.509 MB/s [   4030.5 IOPS] <   247.65 us>

[Write]
  SEQ    1MiB (Q=  8, T= 1):   118.423 MB/s [    112.9 IOPS] < 70195.19 us>
  SEQ    1MiB (Q=  1, T= 1):   110.467 MB/s [    105.3 IOPS] <  9481.69 us>
  RND    4KiB (Q= 32, T= 1):    96.443 MB/s [  23545.7 IOPS] <  1356.73 us>
  RND    4KiB (Q=  1, T= 1):    10.258 MB/s [   2504.4 IOPS] <   398.79 us>

Profile: Default
   Test: 1 GiB (x5)
   Mode: [Admin]
   Time: Measure 5 sec / Interval 5 sec 
   Date: 2023/11/25 22:34:54
     OS: Windows 10 Professional [10.0 Build 19045] (x64)
Comment: NW:1Gbps, SLOG:Off,  for TrueNAS Scale 23.10

上記を参考に fio の設定ファイルを書いた。

fio.txt
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
[global]
direct=1
directory=${TARGET}
group_reporting=1
ioengine=libaio
loops=5
numjobs=1
ramp_time=5
runtime=60
size=${SIZE}
startdelay=5
stonewall

[Read-SEQ-1MQ08T1]
name=${DESC}-${SIZE}-RO-SEQ-1MQ08T1
bs=1MiB
iodepth=8
rw=read

[Read-SEQ-1MQ01T1]
name=${DESC}-${SIZE}-RO-SEQ-1MQ01T1
bs=1MiB
iodepth=1
rw=read

[Read-RND-4kQ32T1]
name=${DESC}-${SIZE}-RO-RND-4kQ32T1
bs=4kiB
iodepth=32
rw=randread

[Read-RND-4kQ01T1]
name=${DESC}-${SIZE}-RO-RND-4kQ01T1
bs=4kiB
iodepth=1
rw=randread

;-------------------------------------------------------------------------------
[Write-SEQ-1MQ08T1]
name=${DESC}-${SIZE}-RW-SEQ-1MQ08T1
bs=1MiB
iodepth=8
rw=write

[Write-SEQ-1MQ01T1]
name=${DESC}-${SIZE}-RW-SEQ-1MQ01T1
bs=1MiB
iodepth=1
rw=write

[Write-RND-4kQ32T1]
name=${DESC}-${SIZE}-RW-RND-4kQ32T1
bs=4kiB
iodepth=32
rw=randwrite

[Write-RND-4kQ01T1]
name=${DESC}-${SIZE}-RW-RND-4kQ01T1
bs=4kiB
iodepth=1
rw=randwrite

利用方法

fio.txt を適当なディレクトリーに配置する

  • SIZE: はテスト容量
  • DESC: 説明
  • TARGET: は測りたいディレクトリーを指定する
1
SIZE=1GiB DESC="SLOG-Y" TARGET=/mnt/tank1/tmp fio -f fio.txt --output-format=terse | awk -F ';' '{print $3, ($7+$48) / 1000}'

結果のサンプル

1
2
3
4
5
6
7
8
9
root@ts664-01[~]# SIZE=1GiB DESC="SLOG-Y" TARGET=/mnt/tank1/tmp fio -f fio.txt --output-format=terse | awk -F ';' '{print $3, ($7+$48) / 1000}'
SLOG-Y-1GiB-RO-SEQ-1MQ08T1 2715.69
SLOG-Y-1GiB-RO-SEQ-1MQ01T1 2838.84
SLOG-Y-1GiB-RO-RND-4kQ32T1 179.292
SLOG-Y-1GiB-RO-RND-4kQ01T1 180.592
SLOG-Y-1GiB-RW-SEQ-1MQ08T1 1950
SLOG-Y-1GiB-RW-SEQ-1MQ01T1 474.296
SLOG-Y-1GiB-RW-RND-4kQ32T1 246.058
SLOG-Y-1GiB-RW-RND-4kQ01T1 260.492

参考情報

Built with Hugo
テーマ StackJimmy によって設計されています。