0

I have problems when I leave computer on during the night, when I resume it in the morning, it becomes very slow, I often wait for few minutes until login form renders, when I login, apps freeze randomly and I must restart it in order to work normally.

What can be the problem?

Eric Carvalho
  • 54,385
umpirsky
  • 4,050
  • 1
    Did you check for a) high disk activity and b) memory usage? I had a similar problem a few weeks ago (which looks like solved itself with some updates coming in from the repos) -- you might check this question for details and possible steps.. – Izzy Jul 12 '12 at 11:03
  • I checked, no memory or CPU overloads. Didn't check HDD activity, how to check that? Thanks. – umpirsky Jul 12 '12 at 13:17
  • Easiest way: check the LED attached and listen to the noise (grin). Without physical approximity, and to figure out who is doing all the business: Take a look at iostat (see also: iostat short description and screenshots. If it's not installed, it ships with the sysstat package (so sudo apt-get install sysstat to get it). – Izzy Jul 12 '12 at 13:37
  • It got hanging untill it render login form for 2 minutes, then it worked fine after login. Here is output of iostat https://gist.github.com/2293fe1208154b2a5cfc – umpirsky Jul 13 '12 at 06:21
  • And it got frozen after few minutes, so I must restart. I disabled sleep and screen locking to prevent this. BTW, after waking from sleep, hard drive LED was glowing all the time, non stop! – umpirsky Jul 13 '12 at 06:35
  • The glowing drive LED indicates a lot of I/O (in my case, this was either Firefox going nuts, or X running havoc -- both luckily solved itself by updates). Time to give iotop (package has the same name) a chance to identify the troublemaking process! – Izzy Jul 13 '12 at 07:01
  • Haha, currently, it is rsync. I have some backups scheduled, and since in that backup I have huge lucene indexes, it gets messy. Will try to remove that. Thanks. – umpirsky Jul 13 '12 at 07:27
  • Glad you've found the cause. I made a summary and provided it as an answer, so it is easier to check. – Izzy Jul 13 '12 at 08:46

1 Answers1

1

Solution as extracted from the comments:

Steps to find the cause involve checking...

  • memory/cpu usage (e.g. using top to look at the processes using most of it)
  • disk activity (first check the disk LED, then iotop from the iotop package proves helpful)

In most cases, one of these two steps identify the process lagging the system. Depending on what it is, further actions can be evaluated (stopping/killing that process or, as in this case, re-organize cron jobs causing heavvy activity to not have them all run at the same time in parallel).

Izzy
  • 3,570