Troubleshoot Slow Hard Drive – Diagnostic Guide

diagnostichard drivetroubleshooting

My computer is suffering of slow-downs and I'm not surprised (it's around 6
years old). Here's what I've verified:

  1. They are not very frequent (only a couple of times a day).
  2. When they happen a single application will hang for 10-60 seconds, while the rest don't hang but also get slow.
  3. Even as it is happening, the CPU usage stays low.
  4. It happens to applications (such as text editor, firefox, skype).
  5. It never happens to some applications (such as games) which I use for hours under heavy CPU load.

Also of note:

  1. The Graphics card and PSU are new (around a year).
  2. Though I have a decent amount of software installed right now, this was happening even right after I reinstalled Windows.
  3. This HDD has been through many partinioning schemes, and a few heavy operations (such as moving around 200GB of data).

Because of the above, I am already 70% sure the problem is with the hard
drive. Before I replace it, however, I want to rule out other less likely
possibilities (such as RAM, software, or PSU).

I don't have the money to replace the entire box right now, but I can easily
replace one of the components.

I've read several questions (such as
this one) which give general guidance on
troubleshooting an unknown issue, that is not what I'm looking for here.

My main question is:
What tests or benchmarks can I run to verify I have a problematic hard drive?
I don't need to solve this problem, I am content with just making sure it's the
hard drive.

I could borrow a newer hard drive from a friend and see if it gets better. A
positive result would rule out all other components, but it wouldn't rule out a
software issue (since this new hard drive won't have any of the software I use
daily).

Running on Windows/Linux.

Best Answer

Checking the S.M.A.R.T. attributes is a useful at-a-glance first step to identifying hard drive issues.

Accessing S.M.A.R.T. Attributes

You can view S.M.A.R.T. attributes on Windows using third-party tools such as GSmartControl.

On macOS, you can use Disk Utility, though it isn't very verbose. You can install smartctl from the package smartmontools to access the S.M.A.R.T. attributes using the command line.

On Linux, the command smartctl -a /dev/hda (from the package smartmontools) gives S.M.A.R.T. information about a hard drive, where /dev/hda is replaced with the device in question. GNOME Disks (gnome-disks from the package gnome-disk-utility, previously known as palimpsest) is a graphical utility that can give some more advice about the condition of your hard drive.

[palimpsest shows a bad HDD.]

Understanding S.M.A.R.T. Attributes

Here are some attributes that are relevant and worth noting. A larger list can be found here.

A non-zero Read Error Rate (ID 1) indicates a problem with either the disk surface or the read/write heads.

The Throughput Performance (ID 2) is the average efficiency of the disk. If the value drops below the threshold, something may be wrong with the disk.

A high Spin-Up Time (ID 3) (recorded in milliseconds) may indicate that the hard drive is having trouble spinning up.

An increasing Reallocated Sectors Count (ID 5) means that areas on the hard drive are failing in integrity, and data had to be moved. This causes performance decreases when sectors are being remapped, but it may be more serious in that the hard drive is about to fail.

A low Seek Time Performance (ID 8) is a sign of a mechanical issue with the magnetic heads.

The Spin Retry Count (ID 10) goes up when a spin-up fails. If this happens, input/output operations are queued until the hard drive can spin normally, which causes slowdowns. More importantly, though, if the hard drive has to retry spinning up, it's a sign of imminent failure.

A non-zero Reported Uncorrectable Errors (ID 187) count means that that number of sectors could not be corrected by hardware error correction. Here's a sign of old age.

The Current Pending Sector Count (ID 197) is the number of sectors waiting to be remapped. This indicates old age of the hard drive.

HDD Benchmarks

[Palimpsest HDD Read Test]

If there's a certain location in the hard drive that is getting poor performance (maybe where frequently used information is stored), hard drive read benchmarks can help confirm this. Above is a screenshot of a hard drive benchmark using palimpsest, now known as GNOME Disks (gnome-disks).

If you prefer to do command line benchmarks on Linux, you can combine multiple options:

  • hdparm (from the package hdparm)
    • hdparm -t /dev/hda — Buffered sequential read test on /dev/hda
    • hdparm -T /dev/hda — Cached sequential read test on /dev/hda
  • dd (from the package coreutils)
    • dd if=/dev/hda of=/dev/zero bs=1M count=1024 — Sustain a read from the beginning of /dev/hda for 1GiB using a block size of 1MiB
  • ioping (from the package ioping)
    • ioping -R /dev/hda — Random read test on /dev/hda

On Windows, you can use tools like HD Tune to do hard drive benchmarks.

On macOS, you can use tools like Blackmagic Disk Speed Test to do hard drive benchmarks.

Related Question