4

I have a virtual server running Debian 5 where any action is very slow (like password verification when logging in via SSH or doing su). I checked the load average, which is hovering around 1-2. Then I stopped all services (apache, mysql, postfix, etc) I could think of and the load average went down to 1.00. But it will not go further down...

I looked at top and no process seems to be using CPU or memory unusually. Log files show no unusual activity and network traffic seems to be normal.

What other tools can I use to diagnose the problem? How can I figure out what is "stuck"? Is it possible that the host machine is at fault here?

DanBig
  • 11,393
  • 1
  • 28
  • 53
Aron
  • 189
  • 7

2 Answers2

2

I seem to remember having an issue with a server that was like this (load at 1 but not CPU). In that particular case it was caused by processes in the "Uninterruptible Sleep" state. Do a ps aux and look for processes with "D" in the STAT column. I honestly can't remember much about this issue, but maybe that's a toehold you can use for further investigation.

jj33
  • 11,038
  • 1
  • 36
  • 50
  • Great. This worked. The evil process was /sbin/syslogd, but the question now is why the hell syslogd is causing trouble... Thanks for the help anyway. – Aron May 03 '11 at 14:15
  • 2
    Just to extend jj33's answer a bit, with the purpose of making processes in D state easier to find, you can use the following `top -b -n 1 | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}'` This will print a list of all processes in D state. – Kendall May 03 '11 at 14:19
0

Use vmstat and see if most used time is System, User, wait or Steal time.

After this, is more easy to find your evil process. :D

This is a nice explanation: http://perumal.org/analyzing-database-server-bottlenecks-using-vmstat/