M1 Mac 的硬盘读写量查询

12 min read
brew install smartmontools

smartctl -a disk0
smartctl 7.3 2022-02-28 r5338 [Darwin 21.6.0 arm64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       APPLE SSD AP1024R
Serial Number:                      0baxxxxxx60ce05
Firmware Version:                   387.140.
PCI Vendor/Subsystem ID:            0x106b
IEEE OUI Identifier:                0x000000
Controller ID:                      0
NVMe Version:                       <1.2
Number of Namespaces:               3
Local Time is:                      Fri Sep 16 21:47:18 2022 CST
Firmware Updates (0x02):            1 Slot
Optional Admin Commands (0x0004):   Frmw_DL
Optional NVM Commands (0x0004):     DS_Mngmt
Maximum Data Transfer Size:         256 Pages

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     0.00W       -        -    0  0  0  0        0       0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        36 Celsius
Available Spare:                    100%
Available Spare Threshold:          99%
Percentage Used:                    0%
Data Units Read:                    3,170,254 [1.62 TB]
Data Units Written:                 3,421,121 [1.75 TB]
Host Read Commands:                 68,526,235
Host Write Commands:                55,863,189
Controller Busy Time:               0
Power Cycles:                       142
Power On Hours:                     49
Unsafe Shutdowns:                   3
Media and Data Integrity Errors:    0
Error Information Log Entries:      0

Read 1 entries from Error Information Log failed: GetLogPage failed: system=0x38, sub=0x0, code=745

• M1 Mac 硬盘读写相较 Intel Mac 在短期内水平偏高

• 不同使用程度的 M1 Mac 读写量也不尽相同,从 10TB - 200TB 不等

• 使用强度较大,即使 16GB RAM 也不能避免读写量过大问题

• 读写占比较高的是 Swap,它是内存不足时系统生成的交换分区,可通过 Swapman 查看。其中使用 Swap 较多的进程是 kernel_task

• 有网友反馈关闭全盘 Spotlight 可有效减少 Swap 读写,未经验证

建议大家在购买 M1 Mac 时,尽量选择大内存大硬盘,可有效增加硬盘寿命。同时,也不要谈 TLC 的 P/E 次数而色变,在主控算法加持下硬盘没有你想的那么脆弱。希望苹果能够尽快意识到这个问题,改进可能的系统问题、优化激进的 Swap 策略