When working with flash devices, monitor how actively you use them and calculate their estimated lifetime.

Typically, storage vendors provide reliable lifetime estimates for a flash device under ideal conditions. For example, a vendor might guarantee a lifetime of 5 years under the condition of 20 GB writes per day. However, the more realistic life expectancy of the device depends on how many writes per day your ESXi host actually generates. Follow these steps to calculate the lifetime of the flash device.

Prerequisites

Note the number of days passed since the last reboot of your ESXi host. For example, ten days.

Procedure

  1. Obtain the total number of blocks written to the flash device since the last reboot.

    Run the esxcli storage core device stats get -d=device_ID command. For example:

    ~ # esxcli storage core device stats get -d t10.xxxxxxxxxxxxxxx
    	Device: t10.xxxxxxxxxxxxxxx
    	Successful Commands: xxxxxxx
    	Blocks Read: xxxxxxxx
    	Blocks Written: 629145600 
    	Read Operations: xxxxxxxx
    

    The Blocks Written item in the output shows the number of blocks written to the device since the last reboot. In this example, the value is 629,145,600. After each reboot, it resets to 0.

  2. Calculate the total number of writes and convert to GB.
    One block is 512 bytes. To calculate the total number of writes, multiply the Blocks Written value by 512, and convert the resulting value to GB.

    In this example, the total number of writes since the last reboot is approximately 322 GB.

  3. Estimate the average number of writes per day in GB.
    Divide the total number of writes by the number of days since the last reboot.

    If the last reboot was ten days ago, you get 32 GB of writes per day. You can average this number over the time period.

  4. Estimate lifetime of your device by using the following formula:
    vendor provided number of writes per day times vendor provided life span divided by actual average number of writes per day
    For example, if your vendor guarantees a lifetime of 5 years under the condition of 20 GB writes per day, and the actual number of writes per day is 30 GB, the life span of your flash device will be approximately 3.3 years.