Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu and every couple minutes it goes unresponsive for a half second to a full second, which isn't normally a problem but makes trying to code extremely frustrating when your trying to hit backspace or navigate the code and nothing is happening. The problem is, the freezes are so brief that top doesn't have time to show me what is spiking the CPU (assuming something is, but I don't know what else could cause this).

Does anyone know how to troubleshoot this performance issue?

Edit: I've tried login in with Gnome Classic (No Effects) instead of Unity but it still freezes up every once in awhile.

Edit: The CPU graph doesn't seem to be showing any actual spikes so it seems you were right and my original diagnosis of CPU spikes being the problem was incorrect, I now suspect IO wait. I don't recall this happening for the brief few weeks I had Windows 7 Starter running on it though, which leads me to believe it isn't (just?) the hardware.. is there anything I can tweak to improve this? I'm using an Acer Aspire One D257, with Ubuntu 11.10.

Edit: Output of dmesg is at http://paste.ubuntu.com/1060054/ and kern.log is at http://paste.ubuntu.com/1060055/

share|improve this question
    
This question is interesting both in general case, and your particular one. –  Rafał Cieślak Mar 28 '12 at 20:24
1  
By turning on a CPU graph, you can know for sure if it is a CPU spike that's causing the slow down. I/O might be another culprit, or network lag in some cases. Does it happen no matter what program you are actively using at the time? –  David Oneill Mar 28 '12 at 21:07
    
Excellent point David, I'll do that. I only ever use Vim and Firefox on this machine, they're always open and it happens no matter which is in the foreground. At first I thought it was automatic ctag generation from Vim, but after commenting out that section, and wiping out my entire vimrc file, the issue still occurs. I'll try the graph to see if it is indeed a CPU spike or IO wait. –  Jeff Welling Mar 29 '12 at 0:59
    
How unresponsive does it get? Does your mouse pointer stop updating? –  AdamKG Mar 29 '12 at 17:25
    
Sorry for the delayed response, I think it freezes the pointer as well, but it's stopped happening or I haven't been noticing it as much lately. Interestingly, I've also had my encrypted USB backup drive plugged in and mounted much of the time lately as well which has me wondering if that could be related. I'm trying to do some more testing with and without the drive plugged in to determine if A) it's related and B) the pointer stops responding during these freezes. –  Jeff Welling Mar 30 '12 at 4:12

2 Answers 2

There are two additional tools that you may want to check out:

If you don't get what you want from those two tools, then you may need to use developer-tools like OProfile or Sysprof.

All the tools listed are available from ubuntu repositories

Regarding your observation with usb, from what I've heard, some usb-controllers behave a bit flaky with certain hardware which can cause Interrupt-storms, this could cause what you are describing. Try searching for usb interrupt storm and you will get quite a few hits.

share|improve this answer
    
Hm, I certainly will look into interrupt storms, but the problem has continued to occur even after I've stopped using usb devices on this system so regularly. Much of the time I'll be programming on the way to work (transit) and that's when I'll notice it. –  Jeff Welling Jun 27 '12 at 11:39

The best way to see this is to use a command-line application like top or htop Install htop.

top
top

htop
htop

You would need to be watching it for a while though until you see what causes the spike (if it is indeed a spike in CPU usage and not in i/o wait, which may not be caught in all cases).

share|improve this answer
1  
I'm familiar with top but not htop, does htop indicate IO wait / how do I interpret that part of it's output? I checked the FAQ on the htop website but it didn't mention IO wait. –  Jeff Welling Mar 30 '12 at 4:08
    
@JefWelling: it does not afaik. Both will show it as CPU usage however. –  RolandiXor Mar 30 '12 at 4:53
    
There's an additional monitor for I/O activities. It's called iotop (see danjo133s answer). –  FuzzyQ Jul 2 '12 at 11:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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