0

Today I've noticed that my desktops HDD LED is blinking even though there are no processes writing or reading the disk (SSD).

I've opened a terminal, ran htop and sorted all processes by IO_RATE. I can could clearly see that none of the processes were writing or reading the disk though my computers HDD LED would still blink 1 to 2 times per second. Why could that be happening?

1 Answer 1

1

There are many reasons why this could happen. Probably the most likely is that writing in Linux usually happens as a writeback (where pages are buffered in the page cache, and later flushed out to disk), which can happen an indefinite amount of time after a write(), whereas I/O counters typically measure immediate write/read throughput.

Another is that these counters really only know what Linux intends to do (and depending on the counter, that excludes even then things like writeback and I/O scheduler decisions), not your disk. Many disks independently perform operations which are not seen by the operating system. A particularly noticeable example -- not your case, but still -- are SMR disks, where even after the operating system is long done writing data, the disk will still work after the fact to move data to the shingles from faster intermediate storage.

In general, measuring I/O at the OS layer has a tendency to be inaccurate, and the counters used by htop are not even the state of the art there. To get closer, consider using cgroup v2's io.stat, which has more granularity and visibility of reporting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.