Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When my server experiences high load and I run a command, there is a long delay after the command has finished before I get the prompt again. Any idea what is causing this?

share|improve this question

closed as too localized by Caleb, Stéphane Gimenez, Mat, Tim Kennedy, jw013 Sep 27 '12 at 18:02

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Why is anything slow when there's high load? It's a game of chase the bottleneck. There's no magic bullet answer. –  bahamat Aug 14 '12 at 9:09
    
I mean it literally takes minutes to print the prompt. The actual command has finished executing (e.g. a cat printed the last line). Is this then the context switch before the shell gets to run again? That would be surprising. –  ensonic Aug 14 '12 at 9:21
    
My guess is that your terminal's nice level is outranked by more demanding processes, so it cannot compete for CPU and has to wait a little longer for attention. –  invert Aug 14 '12 at 9:23
    
How high of a load are we talking here? can you add some CPU averages for us? –  invert Aug 14 '12 at 9:24
1  
Are you sure it's finished? Have you traced it to be certain that it has exited and returned control to the shell? There are about a million things that it could be, ranging from software to hardware. –  bahamat Aug 14 '12 at 9:24
show 1 more comment

1 Answer 1

Something slow is running before each prompt, through the PROMPT_COMMAND mechanism. In my case, this.

share|improve this answer
add comment

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