by sinak · 5y ago · 0 comments
2.5 month old, 1 TB, M1 MBA:
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 46 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 5%
Data Units Read: 315,158,527 [161 TB]
Data Units Written: 303,071,863 [155 TB]
Host Read Commands: 1,331,719,025
Host Write Commands: 1,036,195,203
Controller Busy Time: 0
Power Cycles: 167
Power On Hours: 762
Unsafe Shutdowns: 7 SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 44 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 0%
Data Units Read: 627,718 [321 GB]
Data Units Written: 1,845,489 [944 GB]
Host Read Commands: 5,302,076
Host Write Commands: 204,065,596
Controller Busy Time: 107
Power Cycles: 117
Power On Hours: 765
Unsafe Shutdowns: 03.5 years old Samsung 970 evo 500GB
SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 28 Celsius Available Spare: 100% Available Spare Threshold: 10% Percentage Used: 0% Data Units Read: 9,208,241 [4.71 TB] Data Units Written: 21,345,634 [10.9 TB] Host Read Commands: 132,245,782 Host Write Commands: 346,141,507 Controller Busy Time: 924 Power Cycles: 312 Power On Hours: 2,453 Unsafe Shutdowns: 114
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 36 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 1%
Data Units Read: 56 263 143 [28,8 TB]
Data Units Written: 36 077 380 [18,4 TB]
Host Read Commands: 1 252 403 456
Host Write Commands: 1 018 672 820
Controller Busy Time: 15 360
Power Cycles: 234
Power On Hours: 10 255
Unsafe Shutdowns: 47
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Your values are indeed insane.That's insane, I don't trust it though:
155 TB / (75 days *24*60*60) * 2**20 = ~25 MB / s
If we are more reasonable and say it's running for 12 hours out of the day then that works out at a continuous 50MB/s of writes.For comparison, My daily Linux laptop (XPS 13, 512GB Samsung NVMe SSD) has a total of 3.7 TB of writes over 3 years, this is my work dev and home laptop, it's in constant use (although no video editing):
3.7 TB / (1095 days *24*60*60) * 2**20 = 0.041 MB / s
There are three orders of magnitude difference there. I can only think of three explanations: 1. the SMART reporting is wrong, 2. MacOS or M1 SSD controllers have serious write amplification issues, or 3. you are actually doing something that does need serious write throughput like lots of video editing (your stat's aren't impossible after all).These SSDs can probably write on the order of 3000MB/s = 0.003TB/s, so you could end up with 155 TB total writes after just 155/0.003/3600 = 14 hours of RAM heavy workload.
Or maybe multiple VMs running simultaneously doing CI jobs could also do it.
I don't think simple memory errors like leaks would cause it, since that would just end up filling the disk once, but wouldn't go through writes quite as fast.
# vm_stat
# top -o faults
just 1.5Tb for my 2m old m1 mini.. xcode/firefox > vm_stat
Mach Virtual Memory Statistics: (page size of 16384 bytes)
Pages free: 28209.
Pages active: 114788.
Pages inactive: 111624.
Pages speculative: 1301.
Pages throttled: 0.
Pages wired down: 99067.
Pages purgeable: 11340.
"Translation faults": 340573628.
Pages copy-on-write: 8586888.
Pages zero filled: 184635739.
Pages reactivated: 62859723.
Pages purged: 12373577.
File-backed pages: 88759.
Anonymous pages: 138954.
Pages stored in compressor: 645107.
Pages occupied by compressor: 127459.
Decompressions: 62433647.
Compressions: 82841473.
Pageins: 10295559.
Pageouts: 177162.
Swapins: 16692043.
Swapouts: 17670838.
> top -o faults
PID COMMAND %CPU TIME #TH #WQ #PORT MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH
533 WindowServer 10.5 06:21:59 21 5 2792- 876M- 209M+ 298M 533 1 sleeping *0[1] 0.17876 1.03550 88 24771383+ 131690 354813610+ 136121938+ 237020876+ 554000668+
2862 Safari 0.0 62:48.95 10 3 7051 480M 6400K 316M 2862 1 sleeping *0[37332] 0.00000 0.00000 501 13919243 76306 67003396 20901240 54405367+ 167230473
2883 com.apple.We 0.0 16:36.04 92 3 926 393M 384K 301M 2883 1 sleeping *19137[3734] 0.00000 0.00000 501 4032470 132 7204377 3215767 45641766+ 32182159
491 mds 0.0 11:00.86 5 2 422 66M 0B 52M 491 1 sleeping *0[1] 0.00000 0.00000 0 3296694 154 6396987 1450677 27494382 5594171
792 mds_stores 0.0 14:00.57 4 2 93- 72M- 16K 61M 792 1 sleeping *0[1] 0.00000 0.00000 0 2786911 1956 4619344+ 1304164+ 15524959+ 4296749+
2694 Terminal 7.6 03:17.73 8 2 311 303M- 37M+ 104M- 2694 1 sleeping *0[6352] 0.85412 0.15218 501 2034254+ 338 1151091+ 265791+ 1517195+ 269400
I'm at 1.32TB on my almost 1 month old MBA (8GB RAM/512GB DISK).There must be a lot of swapping happening to make that work.