[smartmontools-support] SSD: Difference between Lifetime_GiB and Logical Sectors - KINGSTON SA400S37240G
Elemat
electromatrix at protonmail.com
Wed Nov 17 01:19:52 CET 2021
smartmontools 7.2 2020-12-30 r5155
Model Family: Phison Driven SSDs
Device Model: KINGSTON SA400S37240G
Firmware Version: S1Z40102
Hello everyone, and thanks to developers and contributors to smartmontools for your work. I'd like to have your comments on what seems a discrepancy in two SMART values of this SSD. The parameters are Logical Sectors Written, reported by "smartctl -l devstat /dev/sda", and Lifetime_Writes_GiB, reported by "smartctl -A /dev/sda". Same for reads, but I'll comment writes only.
Selected output of the first command:
0x01 0x018 6 3436750743 --- Logical Sectors Written
0x01 0x028 6 2179958152 --- Logical Sectors Read
0x07 0x008 1 10 --- Percentage Used Endurance Indicator
I use the first value in a script that translates the logical sectors to GiB to print a projection of Life Left from recent values. In the case above the written GiB are 1638.770. Subsequent increments follow closely the output of iostat command, even after several hours of comparison: both show practically the same amounts and change together, so I trust "-l devstat" as data read/written by the OS.
With "smartctl -A /dev/sda", I get:
231 SSD_Life_Left 0x0000 090 090 000 Old_age Offline - 90
233 Flash_Writes_GiB 0x0032 100 100 000 Old_age Always - 7135
241 Lifetime_Writes_GiB 0x0032 100 100 000 Old_age Always - 5734 <
242 Lifetime_Reads_GiB 0x0032 100 100 000 Old_age Always - 9231
Life estimation is the same, and assuming linear increment from the 10 % used, the 7135 Flash_Writes_GiB could grow up to 76.61 TB at 100 % usage, which is close to the "Total Bytes Written" advertised for this 240G model: "(TBW) 240G─80TB". I thought this made sense and accepted stoically a Write Amplification Factor of 4.3 from the previously computed 1638.770 GiB written.
My problem is with Lifetime_Writes_GiB, AKA Total_LBAs_Written. The logs attached to ticket #801 by two users of the 480G model show perfect correspondence with the value of Sectors Written:
Capac. Total_LBAs_Written Log Sect Writt
User1 480GB 34389 = 72119417008 * 512 / 1024^3
User2 " 2481 = 5203218730 * 512 / 1024^3
There is also another report with equivalent result for the smallest model (can't find it now), and I expected my numbers to fit too, but they don't.
Me 240GB 5734 != 3436750743 * 512 / 1024^3 = 1638.770
My param-241 is more than three times the GiB computed from Logical Sectors Written, and I'm not sure what this means. Adding to confusion, the ratio p-241/p-242 is < 1, while Logical Sectors Written/Read is > 1. I thought SMART reporting could be faulty, but discarded that after finding ticket #1485 with similar data:
User3 1.92TB 5437 != 2813053064 * 512 / 1024^3 = 1341.368
So, how to interpret the difference? The nice correlation we see on the first two cases is not required and they're all correct for a reason?
The only active line in my Mageia's smartd.conf was "DEVICESCAN -a -o on -S on -s L/../../6/03", now edited to stop the weekly extended test. I wonder if those tests have been the cause of the discrepancy by writing so much, and if factory overprovisioning (7 % for 240GB models) would play a role, but at this point my speculations are way over my knowledge and your comments will surely clarify this.
The output of "smartctl -x /dev/sda" (exit code: 64) is attached. Thank you.
-------------- next part --------------
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.14.17-desktop-1.mga8] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Phison Driven SSDs
Device Model: KINGSTON SA400S37240G
Serial Number: 50026B7782D5AF5F
LU WWN Device Id: 5 0026b7 782d5af5f
Firmware Version: S1Z40102
User Capacity: 240,057,409,536 bytes [240 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
TRIM Command: Available
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-3 T13/2161-D revision 4
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Nov 14 20:22:17 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is: Unavailable
APM feature is: Disabled
Rd look-ahead is: Enabled
Write cache is: Enabled
DSN feature is: Unavailable
ATA Security is: Disabled, NOT FROZEN [SEC1]
Wt Cache Reorder: Unavailable
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 120) seconds.
Offline data collection
capabilities: (0x11) SMART execute Offline immediate.
No Auto Offline data collection support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
No Selective Self-test supported.
SMART capabilities: (0x0002) Does not save SMART data before
entering power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 10) minutes.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
1 Raw_Read_Error_Rate -O--CK 100 100 000 - 100
9 Power_On_Hours -O--CK 100 100 000 - 15602
12 Power_Cycle_Count -O--CK 100 100 000 - 633
148 Unknown_Attribute ------ 100 100 000 - 0
149 Unknown_Attribute ------ 100 100 000 - 0
167 Write_Protect_Mode ------ 100 100 000 - 0
168 SATA_Phy_Error_Count -O--C- 100 100 000 - 5
169 Bad_Block_Rate ------ 100 100 000 - 0
170 Bad_Blk_Ct_Erl/Lat ------ 100 100 010 - 0/0
172 Erase_Fail_Count -O--CK 100 100 000 - 0
173 MaxAvgErase_Ct ------ 100 100 000 - 0
181 Program_Fail_Count -O--CK 100 100 000 - 0
182 Erase_Fail_Count ------ 100 100 000 - 0
187 Reported_Uncorrect -O--CK 100 100 000 - 0
192 Unsafe_Shutdown_Count -O--C- 100 100 000 - 112
194 Temperature_Celsius -O---K 030 048 000 - 30 (Min/Max 20/48)
196 Reallocated_Event_Count -O--CK 100 100 000 - 0
199 SATA_CRC_Error_Count -O--CK 100 100 000 - 0
218 CRC_Error_Count -O--CK 100 100 000 - 5
231 SSD_Life_Left ------ 090 090 000 - 90
233 Flash_Writes_GiB -O--CK 100 100 000 - 7135
241 Lifetime_Writes_GiB -O--CK 100 100 000 - 5734
242 Lifetime_Reads_GiB -O--CK 100 100 000 - 9231
244 Average_Erase_Count ------ 100 100 000 - 101
245 Max_Erase_Count ------ 100 100 000 - 137
246 Total_Erase_Count ------ 100 100 000 - 49031
||||||_ K auto-keep
|||||__ C event count
||||___ R error rate
|||____ S speed/performance
||_____ O updated online
|______ P prefailure warning
General Purpose Log Directory Version 1
SMART Log Directory Version 1 [multi-sector log support]
Address Access R/W Size Description
0x00 GPL,SL R/O 1 Log Directory
0x01 SL R/O 1 Summary SMART error log
0x02 SL R/O 1 Comprehensive SMART error log
0x03 GPL R/O 1 Ext. Comprehensive SMART error log
0x04 GPL,SL R/O 8 Device Statistics log
0x06 SL R/O 1 SMART self-test log
0x07 GPL R/O 1 Extended self-test log
0x10 GPL R/O 1 NCQ Command Error log
0x11 GPL R/O 1 SATA Phy Event Counters log
0x30 GPL,SL R/O 9 IDENTIFY DEVICE data log
0x80-0x9f GPL,SL R/W 16 Host vendor specific log
0xde GPL VS 8 Device vendor specific log
SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
Device Error Count: 5 (device log contains only the most recent 4 errors)
CR = Command Register
FEATR = Features Register
COUNT = Count (was: Sector Count) Register
LBA_48 = Upper bytes of LBA High/Mid/Low Registers ] ATA-8
LH = LBA High (was: Cylinder High) Register ] LBA
LM = LBA Mid (was: Cylinder Low) Register ] Register
LL = LBA Low (was: Sector Number) Register ]
DV = Device (was: Device/Head) Register
DC = Device Control Register
ER = Error register
ST = Status register
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 5 [0] log entry is empty
Error 4 [3] log entry is empty
Error 3 [2] log entry is empty
Error 2 [1] occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER -- ST COUNT LBA_48 LH LM LL DV DC
-- -- -- == -- == == == -- -- -- -- --
00 -- 00 00 00 00 00 00 00 00 00 00 00
Commands leading to the command that caused the error were:
CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name
-- == -- == -- == == == -- -- -- -- -- --------------- --------------------
b0 00 d1 01 01 00 00 4f 00 c2 01 00 08 00:00:00.000 SMART READ ATTRIBUTE THRESHOLDS [OBS-4]
2f 00 00 01 01 00 00 00 00 00 03 00 08 00:00:00.000 READ LOG EXT
2f 00 00 01 01 00 00 00 00 00 00 00 08 00:00:00.000 READ LOG EXT
b0 00 d5 01 01 00 00 4f 00 c2 00 00 08 00:00:00.000 SMART READ LOG
b0 00 da 00 00 00 00 4f 00 c2 00 00 08 00:00:00.000 SMART RETURN STATUS
SMART Extended Self-test Log Version: 1 (1 sectors)
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 15565 -
# 2 Extended offline Completed without error 00% 15451 -
# 3 Extended offline Completed without error 00% 15316 -
# 4 Extended offline Interrupted (host reset) 90% 15019 -
# 5 Extended offline Completed without error 00% 14875 -
# 6 Extended offline Interrupted (host reset) 30% 14875 -
# 7 Extended offline Completed without error 00% 14726 -
# 8 Extended offline Completed without error 00% 14569 -
# 9 Extended offline Interrupted (host reset) 80% 14569 -
#10 Extended offline Completed without error 00% 14422 -
#11 Extended offline Interrupted (host reset) 70% 14284 -
#12 Extended offline Completed without error 00% 14136 -
#13 Extended offline Completed without error 00% 13988 -
#14 Extended offline Completed without error 00% 13833 -
#15 Extended offline Interrupted (host reset) 90% 13685 -
#16 Extended offline Completed without error 00% 13538 -
#17 Extended offline Completed without error 00% 13397 -
#18 Extended offline Completed without error 00% 13267 -
#19 Extended offline Completed without error 00% 13129 -
Selective Self-tests/Logging not supported
SCT Commands not supported
Device Statistics (GP Log 0x04)
Page Offset Size Value Flags Description
0x01 ===== = = === == General Statistics (rev 1) ==
0x01 0x008 4 633 --- Lifetime Power-On Resets
0x01 0x010 4 15602 --- Power-on Hours
0x01 0x018 6 3436750743 --- Logical Sectors Written
0x01 0x020 6 13255577 --- Number of Write Commands
0x01 0x028 6 2179958152 --- Logical Sectors Read
0x01 0x030 6 17757 --- Number of Read Commands
0x07 ===== = = === == Solid State Device Statistics (rev 1) ==
0x07 0x008 1 10 --- Percentage Used Endurance Indicator
|||_ C monitored condition met
||__ D supports DSN
|___ N normalized value
Pending Defects log (GP Log 0x0c) not supported
SATA Phy Event Counters (GP Log 0x11)
ID Size Value Description
0x0001 4 0 Command failed due to ICRC error
0x0002 4 0 R_ERR response for data FIS
0x0005 4 0 R_ERR response for non-data FIS
0x000a 4 0 Device-to-host register FISes sent due to a COMRESET
More information about the Smartmontools-support
mailing list