我该如何测试我的 SSD 是否有问题?

我该如何测试我的 SSD 是否有问题?

所以几周前我更新到 17.10,并且几乎同时更新到 Android Studio 3,更新两者可能是一个错误,因为现在我不知道问题出在哪里。

基本上,磁盘 IO 似乎变得非常糟糕。起初我注意到我正在交换,所以我将内存增加了一倍(现在是 32 GB),并且我再也不交换了。但是当发生磁盘 IO 时,机器仍然会冻结。我说的冻结是指它会变得非常慢,以至于我可以打字,但几秒钟内看不到我输入的内容,当这种情况发生时,我经常会得到一个键的长字符串。

当我提交代码时,Android Studio 将对代码进行分析,而 UI 会在分析过程中冻结。这需要几秒钟的时间。在更新这两个功能之前,这些问题都不会发生。

此外,当云站备份运行到我的 NAS 时,速度会变得非常慢。

我有一个Samsung SSD 850 PRO 512GB固态硬盘。

那么我可以运行什么来查看问题是什么?

谢谢。

编辑:

Smartctl 输出:

smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.13.0-16-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     Samsung SSD 850 PRO 512GB
Serial Number:    S250NSAG809789J
LU WWN Device Id: 5 002538 8a0af305f
Firmware Version: EXM02B6Q
User Capacity:    512,110,190,592 bytes [512 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Nov 28 16:22:20 2017 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== 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:        (    0) seconds.
Offline data collection
capabilities:            (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves 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:    ( 272) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   095   095   000    Old_age   Always       -       23126
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       75
177 Wear_Leveling_Count     0x0013   098   098   000    Pre-fail  Always       -       117
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   070   057   000    Old_age   Always       -       30
195 ECC_Error_Rate          0x001a   200   200   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
235 POR_Recovery_Count      0x0012   099   099   000    Old_age   Always       -       34
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       37060089586

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

df-i 输出:

Filesystem              Inodes   IUsed    IFree IUse% Mounted on
udev                   4096227     613  4095614    1% /dev
tmpfs                  4111096    1024  4110072    1% /run
/dev/sda1             29908992 4301747 25607245   15% /
tmpfs                  4111096     524  4110572    1% /dev/shm
tmpfs                  4111096       5  4111091    1% /run/lock
tmpfs                  4111096      18  4111078    1% /sys/fs/cgroup
tmpfs                  4111096      17  4111079    1% /run/user/122
tmpfs                  4111096     458  4110638    1% /run/user/1000
/home/mydir/.Private 29908992 4301747 25607245   15% /home/mydir

答案1

安装Gnome 磁盘实用程序并检查磨损均衡计数和SMART数据或任何类似的测试。

报告的百分比越高,表示您的 SSD 磨损越严重,这意味着您更有可能遇到问题。

安装使用:

apt-get install gnome-disk-utility

通过命令行启动

sudo palimpsest

或通过名称下的应用程序菜单磁盘工具

答案2

SMART 规范化数据倒计时,不是向上!

您可能正在寻找的特定命令是:

sudo smartctl -a /dev/sda | grep Media_Wearout_Indicator

这个值越高,可能您将遇到问题。顺便说一句,我建议您在遇到以下情况后考虑更换驱动器:

  • 50% - 关键任务驱动(由于超出本文范围的原因,需要可以访问无论

  • 30% - 你的 /home 驱动器(你的电影/音乐/个人文件,以及你想随时保存的东西)

  • 其余内容占 20%(在存入冷存储之前只用于备份的驱动器、存放偶尔使用的操作系统的驱动器等)

答案3

根据您的日志输出,您从未对驱动器运行过智能测试。有几种方法可以做到这一点。一种方法是通过我的回答中描述的 GUI这里。

另一种方法是按照答案所述通过命令行发出命令这里

任何测试的结果都会添加到日志中,如下面的命令输出片段所示,该命令sudo smartctl -a /dev/sda来自我的 TOSHIBA THNSNH128GBST SSD:

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     14965         -
# 2  Short offline       Completed without error       00%      1955         -
# 3  Short offline       Completed without error       00%       701         -

相关内容