NVMe Data Units Written
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.
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. [1] Log 09h uses a different quantum; do not reuse this conversion there. [2]
For 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. [3] [4]
A 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. [5] [6]
Relations
- related
- NVMe SMART log, NVMe Percentage Used, NVMe Endurance Group, NVMe Controller Busy Time, NVMe Data Units Read
Limitations
- 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. [1]
Citations
- NVM Express Base Specification 2.3, section 5.2.12.1.3, Figure 210, p. 215: Data Units Written
- NVM Express Base 2.3: section 3.2.3, pp. 81-82; section 5.2.12.1.10, pp. 230-232
- smartmontools pinned manual: --json=v exact integer companions
- smartmontools pinned JSON implementation: set_unsafe_uint128 and compact little-endian arrays
- RFC 8259, section 6: JSON numbers and integer interoperability
- ECMAScript: InternalizeJSONProperty and original source text in reviver context