我在三星第四代磁盘上进行 FIO NVME 测试。测试结果与数据表中的结果相似,但 Randwrite 相差近 5 倍。我从数据表中获取了测试的设置 4KB (4,096 bytes) of data transfer size in Queue Depth=32 by 4 workers

我得到的结果

顺序读取 6741 MB/秒
顺序写入 4027 MB/秒
随机读取 1056K IOPS
随机写入 920K IOPS
rand_write:(g=0):rw=randwrite,bs=(R)4096B-4096B,(W)4096B-4096B,(T)4096B-4096B,ioengine=libaio,iodepth=32
...
fio-3.34
启动 4 个进程
作业:4(f=4):[w(4)][100.0%][w=3585MiB/s][w=918k IOPS][预计 00m:00s]
rand_write:(groupid=0,jobs=4):err=0:pid=419160:2024 年 6 月 27 日星期四 15:10:57
  写入:IOPS=929k,BW=3628MiB/s(3804MB/s)(425GiB/120001msec);0 个区域重置
    slat(纳秒):最小值=1105,最大值=4923.5k,平均值=2131.83,标准差=1574.82
    clat(微秒):最小值=11,最大值=15470,平均值=135.25,标准差=40.34
     纬度(usec):最小值=13,最大值=15554,平均值=137.38,标准差=40.54
    clat 百分位数 (usec):
     | 1.00=[ 109], 5.00=[ 117], 10.00=[ 121], 20.00=[ 125],
     | 30.00=[ 129], 40.00=[ 133], 50.00=[ 135], 60.00=[ 137],
     | 70.00th=[ 139], 80.00th=[ 141], 90.00th=[ 143], 95.00th=[ 153],
     | 99.00=[ 231], 99.50=[ 247], 99.90=[ 310], 99.95=[ 408],
     | 99.99=[ 1221]
   bw(MiB/s):最小值=2110,最大值=4220,每=100.00%,平均值=3631.51,标准差=72.23,样本=956
   iops:最小值=540390,最大值=1080339,平均值=929666.36,标准差=18491.86,样本=956
  纬度(微秒):20=0.01%,50=0.01%,100=0.31%,250=99.28%,500=0.38%
  纬度(微秒):750=0.02%,1000=0.01%
  纬度(毫秒):2=0.01%,4=0.01%,10=0.01%,20=0.01%
  CPU:usr=21.24%,sys=61.52%,ctx=19177737,majf=0,minf=90
  IO深度:1=0.1%,2=0.1%,4=0.1%,8=0.1%,16=0.1%,32=100.0%,>=64=0.0%
     提交:0=0.0%,4=100.0%,8=0.0%,16=0.0%,32=0.0%,64=0.0%,>=64=0.0%
     完成:0=0.0%,4=100.0%,8=0.0%,16=0.0%,32=0.1%,64=0.0%,>=64=0.0%
     已发出 rwts:总计=0,111451144,0,0 短=0,0,0,0 丢弃=0,0,0,0
     延迟:目标=0,窗口=0,百分位数=100.00%,深度=32

运行状态组 0(所有作业):
  写入:bw=3628MiB/s(3804MB/s),3628MiB/s-3628MiB/s(3804MB/s-3804MB/s),io=425GiB(457GB),运行=120001-120001毫秒

磁盘统计信息(读/写):
  nvme0n1:ios=92/111222969,合并=0/0,刻度=10/13512913,in_queue=13512924,实用性=99.87%

结果在数据表中

Random 4KB Read  (Up to) IOPS 1000K
Random 4KB Write (Up to) IOPS 200K

Random performance in Table 3 was measured by using FIO 2.7 in Linux Gen3: CentOS6(kernel 3.14), Gen4: CentOS7(Kernel 5.3.1) with 4KB (4,096 bytes) of data transfer size in Queue Depth=32 by 4 workers. Measurements were performed on a full Logical Block Address (LBA) span of the drive in sustained state. The actual performance
may vary depending on use conditions and environment.

Sequential 128KB Read  (Up to) 6700
Sequential 128KB Write (Up to) 4000

Sequential performance in Table 4 was measured by using FIO 2.7 in Linux Gen3: CentOS6(kernel 3.14), Gen4: CentOS7(Kernel 5.3.1) with 128KB (131,072 bytes) of data
transfer size in Queue Depth=32 by 1 worker.

我使用的工作。

[global]
ioengine=libaio
iodepth=32
blocksize=4K
direct=1
buffered=0
runtime=120
numjobs=4
time_based
filename=/dev/nvme0n1
stonewall
group_reporting


[rand_write]
rw=randwrite

2

  • 在运行 4k 随机写入测试之前,您应该对驱动器进行预处理。我通常会在实际测试之前运行 4k 随机写入负载 3-4 小时,以获得实际结果。您需要在写入测试之前进行工作负载预处理。ssdcentral.net/test-ssd-performance-like-the-


    – 

  • 看起来不错。当磁盘为空时,写入很容易。我会检查并写下结果。


    – 


最佳答案
1

您的 fio 结果是随机 4k 写入。该规格表是连续 128k 写入。非常不同,无法比较。

当 IOPS 是一个限制因素时,块大小越大,每秒传输的数据就越多。


让这个基准与你实际应用程序的容量规划相关又是另一回事:

  • 读/写分布如何?100%的写入似乎不太可能。
  • 该应用程序是否使用 Linux libaio?
  • 是否使用文件系统?
  • 您需要多少 IOPS 才能获得良好的性能?对于一些具有大量并发用户的数据库来说,数十万的随机 IOPS 就足够了。

1

  • 我不明白你的回答。我现在的任务是检查磁盘是否与数据表中写的内容相对应。磁盘没有文件系统。磁盘已格式化。我从磁盘数据表中创建了一个作业。在问题中,我描述了我得到了什么以及数据表中用于比较的值。


    –