Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It frequently takes a long time (5-10 seconds) to save tiny (~100 line) text files on my linux (Ubuntu 9.10) machine. At the same time, it takes just as long to run commands that should normally complete virtually instantaneously (e.g. running ls in a directory with 30 files).

After a few seconds, the problem is gone, and reappears later on. I would estimate that it exists about 10% of the time.

I do have one long-running process using about 100% of one core (this is a 6 core machine) but that's constant - in other words, during the other 90% of the time when things seem to be running fine (no delays), it's still using the same amount of CPU.

What can I do to debug what's causing this? If you have suggestions for the cause, that would be fine, but I'm more interested in learning what tools and commands you'd use to investigate.

share|improve this question
1  
My first thought is disk activity. It is possible that for energy saving reasons your disk is stopped, and when the writing occurs it takes time to spin up. It is possible that the OS still needs disk activity even your script does not directly access the disk. Tweak your energy saving settings and check if the problem goes away. – karatedog Jan 3 at 15:22

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.