Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I find from the hard disk access LED on the front of my machine that the hard disk is being accessed more often and probably because of that, my machine is quite slow. The machine becomes unresponsive even when the load as seen from w command is around 1 or so.

My desktop is optiplex 360 dell machine running Ubuntu 10.04.


output of $free

           total       used       free     shared    buffers     cached
Mem:       3983388    3414860     568528          0     205640     315048
-/+ buffers/cache:    2894172    1089216
Swap:      3999736    1035244    2964492

output of $vmstat

    procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
1  2 1035420 564228 210144 312896   22    8   325   343   18   14  3  3 84 10

My questions are:

  1. How to quantify hard disk access and how to see if it is more than "normal" ?
  2. If it is more than normal, what are my solutions ?



share|improve this question
Your system is probably thrashing due to low free memory. Could you report the results of free when your system is responding slowly? – Nov 20 '11 at 1:28
I have added the output of free and vmstat. Thanks – suresh Nov 20 '11 at 2:24

For me, I prefer using sar if that's installed on your system, and if it's not, install it. On CentOS, it should be th package sysstat. For every given interval, it tells you what your processor is doing. Here's some example output:

07:10:35 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
07:10:36 AM     all      0.06      0.00      0.06      0.00      0.00     99.88
07:10:37 AM     all      0.00      0.00      0.00      0.00      0.00    100.00
07:10:38 AM     all      0.00      0.00      0.06      0.00      0.00     99.94

The %iowait column tells you how much of the time is actually being spent on I/O, such as reading and writing to your disk. I find that most of the time, on a well behaved system, it can sit at around 0%, but on busier systems, it can be around 20% before really having a huge impact. Of course, "normal" is relative. This will help you get to know your system.

A helpful tool when tracking down I/O is iotop. This works like top, but for I/O, where you can see what is causing it. As was posted earlier, one of the most common causes of I/O is actually high RAM usage which is swapping out, so you will likely want to search for high RAM processes also. You can narrow that to the high users with sa -cmik.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .