1

Using either smartctl 7.0 or nvme 1.7, I get the following data from the SMART log

data_units_written                  : 350,371,149
host_write_commands                 : 2,974,115,785

Via smartctl, the first line also shows [179 TB], which is 350,371,149 x 512 = 179,369,326,592. This is Nand Bytes Written.

Write amplification is Nand Bytes Written/Host Bytes Written, but I am not sure how to derive Host Bytes Written from host_write_commands

If I multiply 2,974,115,785 (host_write_commands) x 32 (I got the 32 suggestion from here), I get 95,163,501,216, which is a WAF of 1.88 (179,369,326,592 / 95,163,501,216). This is a reasonable WAF value.

But I have no clue if host_write_commands should be multiplied by 32 to get the amount of host writes in bytes. Depending on how host_write_commands is interpreted, I can have WAF of 8.48 (if I just divide the values in the smart log) or 60.31 (don't even recall how I got this one), the former very high, the latter absurd.

If I get the number of bytes written from /proc/diskstats, I have 30,725,755,952, which gives me a WAF of 5.83 (high, 179,369,326,592 / 30,725,755,952). But /proc/diskstats does not persist across reboots, so it can't be applied in this case.

How do I derive the amount of bytes write requests by the host from host_write_commands? Intel's support is ofc useless in helping me.

Gaia
  • 1,777
  • 4
  • 32
  • 58

1 Answers1

0

What you need is actual bytes written. host_write_commands will not represent that value because it's the number of commands, not the number of bytes, and the number of bytes is variable per command. If your drive doesn't have another SMART attribute that counts bytes written, then you don't have that data.

longneck
  • 22,793
  • 4
  • 50
  • 84
  • Yep, this makes more sense. Unless every command results in the same number of bytes written... – Gaia Dec 10 '19 at 23:44