{
  "slug": "nvme-data-units-written",
  "term": "NVMe Data Units Written",
  "aliases": [
    "Data Units Written",
    "DUW",
    "data_units_written"
  ],
  "definition": "NVMe Data Units Written is the SMART / Health Information log counter of host-written data, excluding metadata, in rounded-up groups of 1,000 units of 512 bytes.",
  "note": "One reported unit corresponds to a 512000-byte quantum. For nonzero raw value v, multiplying v by 512000 gives the upper edge of the reporting bucket, not an exact byte total. Zero means the amount is not reported. Bytes 48 through 63 hold a 128-bit counter: preserve integer precision, for example with a decimal string or BigInt rather than an unrestricted JavaScript Number. [nvme-base-2-3-smart] Log 09h uses a different quantum; do not reuse this conversion there. [nvme-base-2-3-endurance]\n\nFor JSON collection, preserve exact integer companions before calculating differences: smartctl --json=v requests KEY_s decimal strings even for currently small values of potentially large fields. The pinned 128-bit serializer can emit a shorter KEY_le array and makes no array assignment for zero; absent companion data is not itself a device reporting status. [smartctl-json-integers] [smartctl-json-emission]\n\nA Number-only parse can lose adjacent integer increments; converting that Number to BigInt cannot restore them. A source-aware reviver can instead parse the original numeric token. [json-interoperability] [json-source-reviver]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "Host writes are not physical NAND writes, so this counter alone cannot measure write amplification; interval differences also retain the rounding uncertainty of the two readings.",
      "citationIds": [
        "nvme-base-2-3-smart"
      ]
    }
  ],
  "related": [
    "nvme-smart-log",
    "nvme-percentage-used",
    "nvme-endurance-group",
    "nvme-controller-busy-time",
    "nvme-data-units-read"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "nvme-base-2-3-smart",
      "title": "NVM Express Base Specification 2.3, section 5.2.12.1.3, Figure 210, p. 215: Data Units Written",
      "url": "https://nvmexpress.org/wp-content/uploads/NVM-Express-Base-Specification-Revision-2.3-2025.08.01-Ratified.pdf",
      "accessed": "2026-10-14"
    },
    {
      "id": "nvme-base-2-3-endurance",
      "title": "NVM Express Base 2.3: section 3.2.3, pp. 81-82; section 5.2.12.1.10, pp. 230-232",
      "url": "https://nvmexpress.org/wp-content/uploads/NVM-Express-Base-Specification-Revision-2.3-2025.08.01-Ratified.pdf",
      "accessed": "2026-10-15"
    },
    {
      "id": "smartctl-json-integers",
      "title": "smartmontools pinned manual: --json=v exact integer companions",
      "url": "https://github.com/smartmontools/smartmontools/blob/fd31eef5b715c107837ae7d51465334d4d99b5da/src/smartctl.8.in#L354-L361",
      "accessed": "2026-10-18"
    },
    {
      "id": "smartctl-json-emission",
      "title": "smartmontools pinned JSON implementation: set_unsafe_uint128 and compact little-endian arrays",
      "url": "https://github.com/smartmontools/smartmontools/blob/fd31eef5b715c107837ae7d51465334d4d99b5da/lib/json.cpp#L210-L234",
      "accessed": "2026-10-18"
    },
    {
      "id": "json-interoperability",
      "title": "RFC 8259, section 6: JSON numbers and integer interoperability",
      "url": "https://www.rfc-editor.org/rfc/rfc8259.html#section-6",
      "accessed": "2026-10-18"
    },
    {
      "id": "json-source-reviver",
      "title": "ECMAScript: InternalizeJSONProperty and original source text in reviver context",
      "url": "https://tc39.es/ecma262/multipage/structured-data.html#sec-internalizejsonproperty",
      "accessed": "2026-10-18"
    }
  ],
  "updated": "2026-10-26"
}
