Web lists-archives.com

Re: Measuring (or calculating) how many bytes are actually written to disk when I repeatedly save a file




Hi,

On Sat, Apr 06, 2019 at 01:39:27PM -0400, rhkramer@xxxxxxxxx wrote:
> Background: I am considering buying a new disk (and will write an email later 
> with some other questions or observations about the process), but I know that, 
> at least often for SSD drives, they now specify what I will call the longevity 
> in terms of TB TBW (iiuc, that is terabytes total bytes written).

"TBW" in the endurance specs for SSDs is normally "Terabytes
Written". Also that may be 10¹² (10^12) bytes or 2⁴⁰ (2^40) bytes.
Another common metric is Drive Writes Per Day (DWPD).

Like Alexander I use SMART attributes to monitor this. As Alexander
says, the usual attribute is 241. You will have to check what 241
corresponds to though. For example, on some of my machines 241 is
described as "Total_LBAs_Written" and measures 512 byte sectors. On
others I've found it uses units of 1MiB (2²⁰ bytes), 25MiB or 1GiB!

You can test by writing a known quantity of data to the device (say,
with dd) and then checking out with smartctl how much the counters
altered. Here's a blog post where I did this with some flash devices
to determine the 241 unit:

    http://strugglers.net/~andy/blog/2016/11/26/supermicro-sata-dom-flash-devices-dont-report-lifetime-writes-correctly/

Given that you can easily measure how much is written to the device,
do you still need to measure how much is written when editing
specific files?

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting