惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
The GitHub Blog
The GitHub Blog
L
LangChain Blog
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
博客园 - Franky
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
V
V2EX
MyScale Blog
MyScale Blog

博客园 - MSSQL123

timescaledb 扩展 PostgreSQL 18+ 版本下源码编译安装 ubuntu24下 ext4和xfs类型磁盘以及PostgreSQL实例性能对比测试 PostgreSQL 18 新特性 skip scan,一个鸡肋的功能 PostgreSQL 17 流复制中开启逻辑复制槽同步,以及逻辑槽的故障转移 记一次PostgreSQL交叉表crosstab行转列导致的OOM TiDB 扩容与缩容 PostgreSQL 高可用集群 patroni 自动故障转移测试 Ubuntu 20 环境下 patroni 自动化安装,一分钟快速搭建 patroni 集群 Ubuntu 20 环境下 pg_auto_failover 自动化安装,一分钟快速搭建pg_auto_failover集群 PostgreSQL的消息队列扩展pgmq TiDB 最小拓扑架构集群安装 PostgreSQL 逻辑复制中的同步和异步模式以及其表现 prometheus 的 altermanager Silences静默告警,优雅地抑制告警 “世界上百分之99的博士和他们的论文都是垃圾”,原本以为这个观点偏激 pg_auto_failover 在多种场景下自动故障转移的验证 pgbouncer连接池设置与压力测试的最大连接数测试 pg_auto_failover 自动故障转移参数 博文阅读密码验证 - 博客园 pg_auto_failover 高可用中,PostgreSQL实例配置文件的加载步骤 pg_auto_failover集群monitor节点的高可用 prometheus监控Linux Server node_exporter代理安装和配置 prometheus监控windows window_exporter代理安装和配置 Prometheus 和 Grafana 监控 PostgreSQL 记一次MySQL binlog日志导致磁盘空间占满的问题 SQLServer 2019 标准版在虚拟机上无法充分利用CPU的问题诊断 Windows Failover Cluster集群中的EventId 1196错误日志 pg_auto_failover 环境变量导致的show命令错误 SqlServer 事务复制(transaction replication)的复制位点信息 SqlServer 事务复制的两个参数immediate_sync,allow_anonymous MySQL,SqlServer,PostgreSQL中,如何实现锁定一张表
磁盘IO延迟和队列深度的关系
MSSQL123 · 2026-05-08 · via 博客园 - MSSQL123

对于 7200 转机械硬盘的随机 4 KB 读为例:

  • 平均寻道时间:8 ms
  • 平均旋转延迟:4.17 ms
  • 传输时间(4 KB / 150 MB/s):0.026 ms

理论最小平均延迟 ≈ 8 + 4.17 + 0.03 = 12.2 ms,以上从理论上计算出来磁盘IO延迟的时间,以7200转的机械磁盘为例,大概在12毫秒左右,这么算出来最大随机IOPS大概在100左右。

以上因素决定了最小的IO延迟事件,但是IO延迟时间同时也收到其他因素的影响,磁盘队列深度或者长度就是一个非常关键的因素。
机械磁盘(单个盘面下)读写数据靠磁头的移动实现,也即无法真正的并行执行多个读写请求,队列深度超过2之后,IO的请求就需要排队来执行,因此延迟会明显增大。

HDD 的特性:不怕忙,怕排队

结论先行:对于HDD盘,IO延迟只是一个结果,并不是原因,导致IO延迟的根本因素是IO队列的深度,机械磁盘每次只能处理一个IO请求,如果队列过深,IO延迟会指数级增加

HDD 的特性:不怕忙,怕排队,意味着IO延迟将随着队列深度的增加而剧烈增加。这里分别用1,4,8,16,32队列深度做队列深度和IO延迟的性能测试

.\diskspd.exe -o1 -b4k -r -w30 -d120 -Sh -D -L -c10G C:\targetfile\IO.dat
.\diskspd.exe -o4 -b4k -r -w30 -d120 -Sh -D -L -c10G C:\targetfile\IO.dat
.\diskspd.exe -o8 -b4k -r -w30 -d120 -Sh -D -L -c10G C:\targetfile\IO.dat
.\diskspd.exe -o16 -b4k -r -w30 -d120 -Sh -D -L -c10G C:\targetfile\IO.dat
.\diskspd.exe -o32 -b4k -r -w30 -d120 -Sh -D -L -c10G C:\targetfile\IO.dat

image

从上图可以发现,紫色折线为队列深度,红色为IO读延迟(类似于指数级增加),有着非常明显的规律:

1,在队列深入为1的时候,IO延迟,基本上符合理论上计算出来的结果12毫秒左右

2,在队列深入为4的时候,IO延迟明显增加,超过了25毫秒

3,在队列深度为8的时候,IO延迟明显增加,超过了50毫秒

4,在队列深度为16的时候,IO延迟明显增加,短暂报表,会接近或者超过100毫秒(压测后半程队列深度突然下降,不解?)

5,在队列深度为32的时候,IO延迟明显增加,持续报表,会接近或者超过200毫秒(压测后半程队列深度突然下降,不解?)

6,单纯的看IOPS没有意义,IOPS可以随着队列深度的增加而增加(但是也有上限),但是随着队列深度的增加,IO延迟也会剧增。

如下是一个7500转HDD,在遇到某些负载的时候的延迟情况,可达数十万毫秒,某些情况下更高(大表,多个非聚集索引的重索引场景,批量删除操作,即便是SSD,队列也能干爆,只是HDD问题更为明显)

image

也就是说IO延迟只是一个结果,并不是原因,导致IO延迟的根本因素是IO队列的深度,机械磁盘每次只能处理一个IO请求,如果队列过深,IO延迟会成比例增加

prometheus对磁盘IO的监控

prometheus监控信息,由于Prometheus是30秒收集一次统计信息,而perfmon是每秒一次,这个图看起来比较粗略,但与Windows的perfmon得到的结果基本上一致:

IO Utilization,

Average queue size,

Time Spent doing I/Os

这几个指标,其实是一个指标的不同表现形式,实际上都类似于队列深度

image

如何评估HDD盘(或者HDD阵列)的IOPS能力

如果是做数据库,测试其IOPS的时候,队列深度最好设置为1,因为增加队列深度,也即增加-o参数的值,最终的IOPS测试结果可能会得到增加,但在大部分请求伴随着高延迟的代价下得到的结果,这样子是没有实际意义的。

其实不难理解,就好比955工作模式轻松挣1W,跟每天007工作模式,累得生不如死挣1.2W,后者多2K块钱是没有意义的,这是一个道理。

如下是7500转HDD盘队列深度为1,随机读写各半的测试结果,其IOPS数值为148左右。

D:\Tools\DiskSpd\amd64>.\diskspd.exe -o1 -b4k -r -w50 -d300 -Sh -D -L -c10G c:\targetfile\IO.dat

Command Line: .\diskspd.exe -o1 -b4k -r -w50 -d300 -Sh -D -L -c10G c:\targetfile\IO.dat

Input parameters:

        timespan:   1
        -------------
        duration: 300s
        warm up time: 5s
        cool down time: 0s
        measuring latency
        gathering IOPS at intervals of 1000ms
        random seed: 0
        path: 'c:\targetfile\IO.dat'
                think time: 0ms
                burst size: 0
                software cache disabled
                hardware write cache disabled, writethrough on
                performing mix test (read/write ratio: 50/50)
                block size: 4KiB
                using random I/O (alignment: 4KiB)
                number of outstanding I/O operations per thread: 1
                threads per file: 1
                IO priority: normal

System information:

        computer name: ******
        start time: 2026/05/15 01:10:56 UTC

Results for timespan 1:
*******************************************************************************

actual test time:       300.02s
thread count:           1
proc count:             4

CPU |  Usage |  User  |  Kernel |  Idle
-------------------------------------------
   0|   4.02%|   1.45%|    2.57%|  95.98%
   1|   4.55%|   2.69%|    1.86%|  95.45%
   2|   6.46%|   4.30%|    2.17%|  93.54%
   3|   9.48%|   7.58%|    1.90%|  90.52%
-------------------------------------------
avg.|   6.13%|   4.00%|    2.12%|  93.87%

Total IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |       182816768 |        44633 |       0.58 |     148.77 |    6.720 |      36.66 |    24.647 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:         182816768 |        44633 |       0.58 |     148.77 |    6.720 |      36.66 |    24.647

Read IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |        91561984 |        22354 |       0.29 |      74.51 |   11.458 |      18.56 |    25.687 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:          91561984 |        22354 |       0.29 |      74.51 |   11.458 |      18.56 |    25.687

Write IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |        91254784 |        22279 |       0.29 |      74.26 |    1.967 |      19.95 |    22.579 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:          91254784 |        22279 |       0.29 |      74.26 |    1.967 |      19.95 |    22.579



total:
  %-ile |  Read (ms) | Write (ms) | Total (ms)
----------------------------------------------
    min |      0.231 |      0.184 |      0.184
   25th |      5.861 |      0.348 |      0.384
   50th |      8.620 |      0.384 |      3.014
   75th |     11.932 |      0.651 |      8.706
   90th |     18.151 |      1.081 |     14.315
   95th |     20.455 |      2.152 |     18.381
   99th |     33.069 |      4.512 |     28.535
3-nines |    455.087 |    428.028 |    439.342
4-nines |    512.954 |    488.276 |    496.637
5-nines |    520.943 |    522.605 |    522.605
6-nines |    520.943 |    522.605 |    522.605
7-nines |    520.943 |    522.605 |    522.605
8-nines |    520.943 |    522.605 |    522.605
9-nines |    520.943 |    522.605 |    522.605
    max |    520.943 |    522.605 |    522.605

D:\Tools\DiskSpd\amd64>

如下是一个RAID5的HDD阵列的IOPS结果,随机读写各半的测试,其结果在350左右

E:\DiskSpd\amd64>.\diskspd.exe -o1 -b4k -r -w50 -d120 -Sh -D -L -c10G e:\targetfile\IO.dat

Command Line: .\diskspd.exe -o1 -b4k -r -w50 -d120 -Sh -D -L -c10G e:\targetfile\IO.dat

Input parameters:

        timespan:   1
        -------------
        duration: 120s
        warm up time: 5s
        cool down time: 0s
        measuring latency
        gathering IOPS at intervals of 1000ms
        random seed: 0
        path: 'e:\targetfile\IO.dat'
                think time: 0ms
                burst size: 0
                software cache disabled
                hardware write cache disabled, writethrough on
                performing mix test (read/write ratio: 50/50)
                block size: 4KiB
                using random I/O (alignment: 4KiB)
                number of outstanding I/O operations per thread: 1
                threads per file: 1
                IO priority: normal

System information:

        computer name: LTGNSQADB02
        start time: 2026/05/20 09:22:53 UTC

Results for timespan 1:
*******************************************************************************

actual test time:       120.00s
thread count:           1
proc count:             8

CPU |  Usage |  User  |  Kernel |  Idle
-------------------------------------------
   0|   7.38%|   1.88%|    5.51%|  92.62%
   1|   8.68%|   2.19%|    6.50%|  91.32%
   2|   4.65%|   2.24%|    2.41%|  95.35%
   3|   4.30%|   1.82%|    2.47%|  95.70%
   4|  15.22%|   5.43%|    9.79%|  84.78%
   5|  22.94%|   8.49%|   14.45%|  77.06%
   6|  13.45%|   3.93%|    9.52%|  86.55%
   7|  13.26%|   6.16%|    7.10%|  86.74%
-------------------------------------------
avg.|  11.24%|   4.02%|    7.22%|  88.76%

Total IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |       172396544 |        42089 |       1.37 |     350.74 |    2.849 |      41.20 |     4.100 | e:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:         172396544 |        42089 |       1.37 |     350.74 |    2.849 |      41.20 |     4.100

Read IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |        86278144 |        21064 |       0.69 |     175.53 |    5.528 |      19.22 |     4.381 | e:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:          86278144 |        21064 |       0.69 |     175.53 |    5.528 |      19.22 |     4.381

Write IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |        86118400 |        21025 |       0.68 |     175.21 |    0.166 |      25.18 |     0.175 | e:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:          86118400 |        21025 |       0.68 |     175.21 |    0.166 |      25.18 |     0.175



total:
  %-ile |  Read (ms) | Write (ms) | Total (ms)
----------------------------------------------
    min |      0.111 |      0.095 |      0.095
   25th |      3.023 |      0.126 |      0.147
   50th |      4.762 |      0.147 |      0.425
   75th |      6.461 |      0.166 |      4.767
   90th |      9.905 |      0.201 |      6.827
   95th |     12.456 |      0.240 |      9.914
   99th |     24.725 |      0.867 |     17.671
3-nines |     43.383 |      1.390 |     37.767
4-nines |     56.941 |      4.524 |     56.284
5-nines |     60.794 |     16.828 |     60.794
6-nines |     60.794 |     16.828 |     60.794
7-nines |     60.794 |     16.828 |     60.794
8-nines |     60.794 |     16.828 |     60.794
9-nines |     60.794 |     16.828 |     60.794
    max |     60.794 |     16.828 |     60.794

E:\DiskSpd\amd64>

如下是一个SATA类型的SSD的测试结果,队列深度为1的,读写对半的情况下IOPS大概在12000,可以说相对HDD盘来说,是一个飞跃的提升了

D:\Tools\DiskSpd\amd64>.\diskspd.exe -o1 -b4k -r -w50 -d120 -Sh -D -L -c10G c:\targetfile\IO.dat
WARNING: Error adjusting token privileges for SeManageVolumePrivilege (error code: 1300)
WARNING: Could not set privileges for setting valid file size; will use a slower method of preparing the file

Command Line: .\diskspd.exe -o1 -b4k -r -w50 -d120 -Sh -D -L -c10G c:\targetfile\IO.dat

Input parameters:

        timespan:   1
        -------------
        duration: 120s
        warm up time: 5s
        cool down time: 0s
        measuring latency
        gathering IOPS at intervals of 1000ms
        random seed: 0
        path: 'c:\targetfile\IO.dat'
                think time: 0ms
                burst size: 0
                software cache disabled
                hardware write cache disabled, writethrough on
                performing mix test (read/write ratio: 50/50)
                block size: 4KiB
                using random I/O (alignment: 4KiB)
                number of outstanding I/O operations per thread: 1
                threads per file: 1
                IO priority: normal

System information:

        computer name: GoldenQADBSrv01
        start time: 2026/05/20 05:41:25 UTC

Results for timespan 1:
*******************************************************************************

actual test time:       120.00s
thread count:           1
proc count:             8

CPU |  Usage |  User  |  Kernel |  Idle
-------------------------------------------
   0|  33.76%|   2.62%|   31.15%|  66.24%
   1|   7.66%|   4.54%|    3.11%|  92.34%
   2|  10.31%|   7.72%|    2.59%|  89.69%
   3|  11.45%|  10.00%|    1.45%|  88.55%
   4|  21.54%|  18.75%|    2.79%|  78.46%
   5|   4.36%|   3.84%|    0.52%|  95.64%
   6|  11.11%|   8.36%|    2.75%|  88.89%
   7|  10.20%|   8.36%|    1.84%|  89.80%
-------------------------------------------
avg.|  13.80%|   8.02%|    5.77%|  86.20%

Total IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |      6010601472 |      1467432 |      47.77 |   12228.56 |    0.080 |    1780.33 |     0.214 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:        6010601472 |      1467432 |      47.77 |   12228.56 |    0.080 |    1780.33 |     0.214

Read IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |      3004678144 |       733564 |      23.88 |    6113.01 |    0.111 |     891.56 |     0.143 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:        3004678144 |       733564 |      23.88 |    6113.01 |    0.111 |     891.56 |     0.143

Write IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |      3005923328 |       733868 |      23.89 |    6115.55 |    0.049 |     891.98 |     0.264 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:        3005923328 |       733868 |      23.89 |    6115.55 |    0.049 |     891.98 |     0.264



total:
  %-ile |  Read (ms) | Write (ms) | Total (ms)
----------------------------------------------
    min |      0.049 |      0.036 |      0.036
   25th |      0.088 |      0.040 |      0.043
   50th |      0.101 |      0.043 |      0.083
   75th |      0.107 |      0.045 |      0.101
   90th |      0.117 |      0.050 |      0.108
   95th |      0.152 |      0.056 |      0.118
   99th |      0.383 |      0.075 |      0.254
3-nines |      2.471 |      2.421 |      2.449
4-nines |      4.105 |      4.047 |      4.067
5-nines |     10.860 |      5.427 |      7.009
6-nines |     34.518 |    201.040 |     34.518
7-nines |     34.518 |    201.040 |    201.040
8-nines |     34.518 |    201.040 |    201.040
9-nines |     34.518 |    201.040 |    201.040
    max |     34.518 |    201.040 |    201.040

D:\Tools\DiskSpd\amd64>

如下是一个NVME类型的SSD的测试结果,队列深度为1的,读写对半的情况下IOPS大概在16000

D:\install\DiskSpd\amd64>.\diskspd.exe -o1 -b4k -r -w50 -d120 -Sh -D -L -c10G c:\targetfile\IO.dat
WARNING: Error adjusting token privileges for SeManageVolumePrivilege (error code: 1300)
WARNING: Could not set privileges for setting valid file size; will use a slower method of preparing the file

Command Line: .\diskspd.exe -o1 -b4k -r -w50 -d120 -Sh -D -L -c10G c:\targetfile\IO.dat

Input parameters:

        timespan:   1
        -------------
        duration: 120s
        warm up time: 5s
        cool down time: 0s
        measuring latency
        gathering IOPS at intervals of 1000ms
        random seed: 0
        path: 'c:\targetfile\IO.dat'
                think time: 0ms
                burst size: 0
                software cache disabled
                hardware write cache disabled, writethrough on
                performing mix test (read/write ratio: 50/50)
                block size: 4KiB
                using random I/O (alignment: 4KiB)
                number of outstanding I/O operations per thread: 1
                threads per file: 1
                IO priority: normal

System information:

        computer name: ywang
        start time: 2026/05/20 06:36:44 UTC

Results for timespan 1:
*******************************************************************************

actual test time:       120.01s
thread count:           1
proc count:             28

CPU |  Usage |  User  |  Kernel |  Idle
-------------------------------------------
   0|  17.52%|   2.59%|   14.93%|  82.48%
   1|   3.49%|   1.67%|    1.82%|  96.51%
   2|   5.52%|   2.69%|    2.83%|  94.48%
   3|   0.00%|   0.00%|    0.00%| 100.00%
   4|   1.72%|   0.94%|    0.78%|  98.28%
   5|   0.00%|   0.00%|    0.00%| 100.00%
   6|   0.53%|   0.27%|    0.26%|  99.47%
   7|   0.00%|   0.00%|    0.00%| 100.00%
   8|  11.55%|   6.15%|    5.40%|  88.45%
   9|   4.21%|   2.15%|    2.06%|  95.79%
  10|  12.17%|   6.80%|    5.38%|  87.83%
  11|   4.06%|   2.59%|    1.47%|  95.94%
  12|   0.26%|   0.13%|    0.13%|  99.74%
  13|   0.00%|   0.00%|    0.00%| 100.00%
  14|   0.99%|   0.61%|    0.38%|  99.01%
  15|   2.27%|   1.38%|    0.89%|  97.73%
  16|   8.36%|   5.05%|    3.31%|  91.64%
  17|   8.15%|   5.08%|    3.07%|  91.85%
  18|   3.96%|   1.98%|    1.98%|  96.04%
  19|   2.40%|   1.28%|    1.12%|  97.60%
  20|  11.25%|   7.37%|    3.88%|  88.75%
  21|   3.28%|   1.91%|    1.37%|  96.72%
  22|   1.42%|   0.66%|    0.76%|  98.58%
  23|   1.19%|   0.43%|    0.76%|  98.81%
  24|   6.65%|   3.74%|    2.92%|  93.35%
  25|   1.97%|   0.95%|    1.02%|  98.03%
  26|   2.80%|   1.64%|    1.16%|  97.20%
  27|   5.85%|   3.36%|    2.49%|  94.15%
-------------------------------------------
avg.|   4.34%|   2.19%|    2.15%|  95.66%

Total IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |      7903731712 |      1929622 |      62.81 |   16078.88 |    0.062 |    1172.07 |     0.146 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:        7903731712 |      1929622 |      62.81 |   16078.88 |    0.062 |    1172.07 |     0.146

Read IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |      3949629440 |       964265 |      31.39 |    8034.89 |    0.110 |     597.09 |     0.193 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:        3949629440 |       964265 |      31.39 |    8034.89 |    0.110 |     597.09 |     0.193

Write IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | IopsStdDev | LatStdDev |  file
------------------------------------------------------------------------------------------------------------------
     0 |      3954102272 |       965357 |      31.42 |    8043.99 |    0.014 |     580.11 |     0.022 | c:\targetfile\IO.dat (10GiB)
------------------------------------------------------------------------------------------------------------------
total:        3954102272 |       965357 |      31.42 |    8043.99 |    0.014 |     580.11 |     0.022



total:
  %-ile |  Read (ms) | Write (ms) | Total (ms)
----------------------------------------------
    min |      0.013 |      0.012 |      0.012
   25th |      0.052 |      0.013 |      0.013
   50th |      0.080 |      0.013 |      0.050
   75th |      0.093 |      0.014 |      0.080
   90th |      0.119 |      0.015 |      0.096
   95th |      0.137 |      0.017 |      0.120
   99th |      1.319 |      0.031 |      1.019
3-nines |      1.558 |      0.141 |      1.505
4-nines |      2.606 |      0.863 |      1.988
5-nines |      6.854 |      1.892 |      6.244
6-nines |      9.809 |      9.708 |      9.708
7-nines |      9.809 |      9.708 |      9.809
8-nines |      9.809 |      9.708 |      9.809
9-nines |      9.809 |      9.708 |      9.809
    max |      9.809 |      9.708 |      9.809

D:\install\DiskSpd\amd64>

SSD的队列深度与IO延迟的关系

参考这里,是传统的SATA SSD磁盘的IO此时结果(并非相相对先进的NVME SSD),可以看出,在队列深度小于16的情况下,平均响应时间的(或者说是IO延迟时间),并没有非常明显的增加。

image