# 写入放大

**写入放大**是闪存固态硬盘（SSD）中的一种现象，指物理写入 NAND 闪存介质的数据量超过主机实际请求写入的数据量。它用**写入放大系数（WAF）**来量化，即介质写入量与主机写入量之比：WAF 为 2 意味着主机每写入 4 KB，最终写入介质的是 8 KB。<sup>[1](https://nvmexpress.org/nvmeflexible-data-placement-fdp-blog/)</sup> 由于每个闪存单元只能承受有限次数的编程/擦除（P/E）循环，额外的写入会消耗耐久度，缩短硬盘寿命并降低写入性能。<sup>[2](https://ieeexplore.ieee.org/document/6730764/)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | WAF = 设备写入介质的数据量 ÷ 主机写入的数据量；值为 1 表示没有放大<sup>[1](https://nvmexpress.org/nvmeflexible-data-placement-fdp-blog/)</sup><sup> • </sup><sup>[3](https://kb.segger.com/Write_amplification)</sup> |
| 主要原因 | 垃圾回收、磨损均衡、元数据更新和映射表更新<sup>[2](https://ieeexplore.ieee.org/document/6730764/)</sup> |
| 工作负载依赖性 | 严格顺序写入不产生写入放大；随机写入会造成相当大的放大<sup>[4](https://arxiv.org/html/1208.1794v1)</sup> |
| 预留空间 | 企业级 SSD 历来预留约 28% 的 NAND 闪存以使垃圾回收高效运行<sup>[5](https://csd-web-01.andrew.cmu.edu/sites/default/files/phd-thesis/CMU-CS-20-130.pdf)</sup> |
| Trim 效果 | 在 10% Trim 请求的工作负载下，物理备用因子为零的硬盘可获得 0.11 的有效备用因子，相当于多出 12.5% 的物理空间<sup>[4](https://arxiv.org/html/1208.1794v1)</sup> |
| 现场观测 | 在一项针对近 200 万块生产环境 SSD 的研究中，WAF 的第 10 百分位为 2，第 99 百分位为 480<sup>[6](https://www.usenix.org/system/files/fast22-maneas.pdf)</sup> |
| 耐久度计算 | 可写总数据量 ≈ NAND 容量 × 擦除次数 ÷ WAF；一台容量为 128 MiB、每个块可擦除 10,000 次、WAF 为 1.2 的设备可存储约 1000 GiB 的写入量<sup>[3](https://kb.segger.com/Write_amplification)</sup> |

## 闪存为何会放大写入

NAND 闪存无法原地覆盖数据。页是最小的写入单元，必须先擦除，而擦除以更粗的块粒度进行，一个块通常包含 64 到 256 页。因此写入以日志结构的方式进入新页，数据的旧副本在闪存转换层（FTL）——硬盘维护的逻辑到物理映射——中被标记为无效。<sup>[4](https://arxiv.org/html/1208.1794v1)</sup>

当硬盘用完空闲块时，它会执行**垃圾回收**：选择一个牺牲块，将其中仍然有效的页复制到别处，擦除该块，然后将其放回空闲池。有效页的复制是主机从未请求的写入流量，也是写入放大的主要来源。<sup>[4](https://arxiv.org/html/1208.1794v1)</sup> [磨损均衡](https://www.edgepedia.org/zh/wear-leveling)会重新分配数据以使各块均匀老化，元数据和映射表的更新也会增加额外的内部写入。<sup>[2](https://ieeexplore.ieee.org/document/6730764/)</sup>

工作负载决定了这一代价有多高。在严格顺序写入的工作负载下，随着写入推进，整个块都会被标记为无效，因此垃圾回收找不到需要复制的有效页，写入放大系数为 1，因为没有额外的内部写入。<sup>[4](https://arxiv.org/html/1208.1794v1)</sup><sup> • </sup><sup>[15](https://www.snia.org/education/online-dictionary/term/write-amplification-factor)</sup> 随机写入将有效页和无效页分散到各个块中，迫使进行大量复制；在最坏情况下，被取代的页均匀分布，一个含 N 页的块每进行一次新数据写入就需要 N−1 次清理写入。<sup>[7](https://www.usenix.org/legacy/events/usenix08/tech/full_papers/agrawal/agrawal_html/index.html)</sup> 贪婪垃圾回收总是回收有效页最少的块，已被证明在减少写入放大方面对随机工作负载是最优的。<sup>[4](https://arxiv.org/html/1208.1794v1)</sup>

## 测量该系数

WAF 按同一时期内物理写入 NAND 闪存的数据量与主机写入的逻辑数据量之比计算。<sup>[8](https://www.researchgate.net/publication/262362154_Measuring_and_Analyzing_Write_Amplification_Characteristics_of_Solid_State_Disks)</sup> 该值永远不会小于 1，较低的值意味着更长的设备寿命和更好的写入性能。<sup>[3](https://kb.segger.com/Write_amplification)</sup>

硬盘通过标准报告接口暴露这些要素。NVMe SMART/健康日志页报告数据单元写入量（主机写入），在耐久度组日志中报告介质单元写入量，后者包括垃圾回收等控制器写入；耐久度估算字段是在假设写入放大为 1 的前提下表示的。<sup>[9](https://nvmexpress.org/wp-content/uploads/NVM-Express-Base-Specification-2.0d-2024.01.11-Ratified.pdf)</sup> 一些厂商提供专用属性；在某些美光硬盘上，WAF 可推导为 1 加上 FTL 发起的 NAND 编程操作与主机发起的 NAND 编程操作之比（SMART 属性 248 和 247）。<sup>[10](https://github.com/shehbazj/SSDWriteAmplification)</sup>

## 什么会升高和降低 WAF

**预留空间**是传统的补救措施。通过提供比用户逻辑可访问更多的物理存储，硬盘推迟了任何给定块的垃圾回收，提高了其更多页变为无效、在回收时无需复制的几率。<sup>[4](https://arxiv.org/html/1208.1794v1)</sup> 企业级 SSD 为此预留了约 28% 的 NAND 闪存；随着页磨损、部分预留被替换消耗，垃圾回收效率下降，写入放大上升，剩余页的磨损加速。<sup>[5](https://csd-web-01.andrew.cmu.edu/sites/default/files/phd-thesis/CMU-CS-20-130.pdf)</sup> 分析模型证实了这一方向：写入放大随预留空间增加而降低。<sup>[11](https://www.systor.org/2009/papers/2_2_2.pdf)</sup>

**Trim** 从主机侧解决这个问题。Trim 命令告诉 SSD 数据不再需要，因此这些页可被视为无效并在垃圾回收时跳过。Trim 实际上增加了硬盘的预留空间：在一个模型中，10% Trim 请求的工作负载使制造商备用因子为零的硬盘获得 0.11 的有效备用因子，仅靠物理预留需要多出 12.5% 的物理空间才能达到同等效果。<sup>[4](https://arxiv.org/html/1208.1794v1)</sup>

**数据温度**很重要，因为频繁重写的热数据和很少触及的冷数据老化方式不同。将它们混在同一块中意味着每当热邻居被回收时冷页也必须被复制。与混合相比，物理分离热数据和冷数据可降低写入放大，除非冷数据只占用户空间的极小部分。<sup>[4](https://arxiv.org/html/1208.1794v1)</sup> 多流 SSD 通过将逻辑上分离的写入流导向不同的物理区域来应用这一思路，提高垃圾回收效率并降低 WAF。<sup>[12](https://www.mdpi.com/2076-3417/16/2/838)</sup>

## 生产环境硬盘的实际表现

一项针对 NetApp 企业存储系统中近 200 万块 SSD 的现场研究，涵盖 3 家制造商、20 个硬盘系列和 4 种闪存技术，首次给出了生产环境中 WAF 的大规模图景。<sup>[6](https://www.usenix.org/system/files/fast22-maneas.pdf)</sup> 分布很宽：第 10 百分位仅为 2，而第 99 百分位达到 480，98.8% 的硬盘超过了早先一项范围较窄的现场研究报告的 WAF 1.3。<sup>[6](https://www.usenix.org/system/files/fast22-maneas.pdf)</sup>

固件主导了结果。三个硬盘系列的中位 WAF 值约为 100，比大多数其他系列高出一个数量级，尽管主机写入速率相当。过量的部分并非来自垃圾回收或磨损均衡，而是来自为避免保持错误而进行的激进块重写——在闪存单元累积的错误超出纠错能力之前重新映射存储的数据。<sup>[6](https://www.usenix.org/system/files/fast22-maneas.pdf)</sup> 该研究还指出，跟踪驱动的模拟报告的 WAF 值处于观测范围的低端，因为现代 FTL 行为难以在模拟中重现。<sup>[6](https://www.usenix.org/system/files/fast22-maneas.pdf)</sup>

## 通过改变接口降低 WAF

较新的接口在主机和设备之间传递信息，使数据落在垃圾回收代价最低的位置。**NVMe 灵活数据放置（FDP）**允许主机在每次写入时提供放置提示，使倾向于一起使用的数据在物理上相邻放置；这减少了垃圾回收和 WAF，同时消除了对预留空间的需求，在适当的提示下可实现接近 1.0 的 WAF。<sup>[1](https://nvmexpress.org/nvmeflexible-data-placement-fdp-blog/)</sup>

**分区命名空间（ZNS）**接口更进一步，向主机软件暴露闪存擦除块边界和写入顺序规则，主机软件随后必须自行管理放置。这消除了传统块接口的显著成本，包括容量预留、用于页映射表的 DRAM 以及垃圾回收开销；RocksDB 等分区专用应用在相同硬件上实现了原来 2 倍的写入吞吐量，并将尾部读延迟降至原来的四分之一至二分之一。<sup>[13](https://www.usenix.org/conference/atc21/presentation/bjorling)</sup>

并非所有介质都会放大。英特尔傲腾技术无需擦除步骤即可原地写入，据英特尔称不会遭受内部写入放大，该公司将此列为相比基于 NAND 的存储具有更高写入耐久度的原因之一。<sup>[14](https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/transforming-business-with-data-337709-001-white-paper.pdf)</sup>

## References

1. [Overcoming the Write Amplification Problem with NVM Express Flexible Data Placement, NVM Express blog](https://nvmexpress.org/nvmeflexible-data-placement-fdp-blog/)
2. [Measuring and Analyzing Write Amplification Characteristics of Solid State Disks, IEEE MASCOTS 2013](https://ieeexplore.ieee.org/document/6730764/)
3. [Write amplification, SEGGER Knowledge Base](https://kb.segger.com/Write_amplification)
4. [Frankie, Hughes, Kreutz-Delgado (2012). Analysis of Trim Commands on Overprovisioning and Write Amplification in Solid State Drives. arXiv:1208.1794](https://arxiv.org/html/1208.1794v1)
5. [CMU-CS-20-130 PhD thesis on enterprise SSD overprovisioning and wear-out](https://csd-web-01.andrew.cmu.edu/sites/default/files/phd-thesis/CMU-CS-20-130.pdf)
6. [Maneas, Mahdaviani, Emami, Schroeder (2022). Operational Characteristics of SSDs in Enterprise Storage Systems: A Large-Scale Field Study. FAST 22](https://www.usenix.org/system/files/fast22-maneas.pdf)
7. [Agrawal et al. (2008). Design Tradeoffs for SSD Performance. USENIX 2008](https://www.usenix.org/legacy/events/usenix08/tech/full_papers/agrawal/agrawal_html/index.html)
8. [Measuring and Analyzing Write Amplification Characteristics of Solid State Disks, ResearchGate](https://www.researchgate.net/publication/262362154_Measuring_and_Analyzing_Write_Amplification_Characteristics_of_Solid_State_Disks)
9. [NVM Express Base Specification 2.0d](https://nvmexpress.org/wp-content/uploads/NVM-Express-Base-Specification-2.0d-2024.01.11-Ratified.pdf)
10. [SSDWriteAmplification: tests for measuring write amplification, GitHub](https://github.com/shehbazj/SSDWriteAmplification)
11. [Write Amplification Analysis in Flash-Based Solid State Drives, SYSTOR 2009](https://www.systor.org/2009/papers/2_2_2.pdf)
12. [Mitigating Write Amplification via Stream-Aware Block-Level Buffering in Multi-Stream SSDs, Applied Sciences](https://www.mdpi.com/2076-3417/16/2/838)
13. [Bjorling et al. (2021). ZNS: Avoiding the Block Interface Tax for Flash-based SSDs. USENIX ATC 21](https://www.usenix.org/conference/atc21/presentation/bjorling)
14. [Transforming Business with Data, Intel white paper on Optane technology](https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/transforming-business-with-data-337709-001-white-paper.pdf)
15. [write amplification factor, SNIA, Experts on Data](https://www.snia.org/education/online-dictionary/term/write-amplification-factor)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Storage devices & memory › Solid-state storage & memory modules › Write amplification & over-provisioning

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/write-amplification

English original: https://www.edgepedia.org/write-amplification
