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.

Sometimes my system (Ubuntu 10.04 .. 12.04) becomes almost unresponsive due to some I/O activities.

For example, this happens when some RAM content is being moved to swap on resume from suspend mode. I've made that conclusion after looking into htop (swap size was growing) and iotop (swap process I/O rate was about 3MB/s) output.

Another example is /etc/cron.daily/popularity-contest. When it is running the system becomes unusable.

==========UPDATE 7.03.2013===========

One more example, updatedb.mlocate (I/O rate 3-5MB/s), as you can see below there was enough free RAM when it was running

# free -m
             total       used       free     shared    buffers     cached
Mem:          3919       3494        424          0         10        107
-/+ buffers/cache:       3377        542
Swap:         4102        134       3967

=====================================

First of all, it is not quite clear for me why I/O activity causes other running applications being blocked?

Second question: Is there any way to avoid that annoying happening?

==========UPDATE 7.03.2013===========

I didn't ever noticed such effect on Windows. Thus I believe there must be some system property which can be tuned.

=====================================

Sys. info:

  • Ubuntu 12.04 x86_64

  • Laptop (SATA HDD 5400rpm), RAM 4GB.

share|improve this question
    
As with all OSs, there's nothing much the kernel can do when it's in the dreaded iowait state. Appears you are paging/swapping due to limited physical memory (pinned). Would suggest adding more memory if possible or removing unnecessary daemon/background processes such as popularity-contest. –  cogitoergosum Mar 6 '13 at 11:26
    
How much RAM is there? Can you add the output of free -m to the question. –  mikewhatever Mar 6 '13 at 11:27
    
Updated in description. –  gumkins Mar 7 '13 at 4:52
    
4 GB physical memory (pinned) should be sufficient to run ubuntu, of course unless your install baseline is runtime-saturated. Based on your output (free), you are paging (swap line). Would suggest perusing your processes (ps, top, etc) to determine processes with large SIZE and RSS and uninstalling unnecessary applications. In addition to cron jobs, you may want to look at /etc/xdg/autostart to determine if your baseline has applications/services that are started automatically. Good luck. –  cogitoergosum Mar 7 '13 at 16:57
    
Yes, I did that before. And I would probably turn off more services unless I see I have 400-500MB free RAM. BTW, I had vm.swappiness=20 when I posted this. Now I turned swap off because sometimes (~1/15) after resume I have to wait for 10-15 minutes because of "RAM to Swap" process. But that is another issue. –  gumkins Mar 23 '13 at 10:37

1 Answer 1

There's definitely a bug with mlocate.db, see https://bugs.launchpad.net/ubuntu/+source/mlocate/+bug/1190696. I'm not quite sure that this is what's effecting you. To know for certain, run iotop, with sudo, from the CLI. You may need to install iotop first, apt-get install iotop with sudo.

share|improve this answer

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.